Tool Chaining
This page shows concrete, copy-pasteable chains designed for autonomous runtimes: value in 1 call, then compact discovery, then a measurable loop closure.
Chain 1: Incident (MCP only)
# Value in 1 call
curl -sS https://api.delx.ai/v1/mcp \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "crisis_intervention",
"arguments": {
"agent_id": "runner-01",
"incident_summary": "429 retry storm after deploy; latency p95 rising; queue depth up",
"urgency": "high",
"source": "other"
}
}
}'Chain 2: A2A → MCP (handoff)
# 1) Ask via A2A (neutral mode). Capture result.session_id
curl -sS https://api.delx.ai/v1/a2a \
-H 'content-type: application/json' \
-H 'x-delx-agent-id: runner-01' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"mode": "neutral",
"message": { "role": "user", "parts": [{ "kind": "text", "text": "Need deterministic next step for a timeout loop" }] },
"configuration": { "contextId": "demo", "agentName": "runner-01", "sourcePlatform": "docs" }
}
}'
# 2) Discover tools (compact). Delx includes schema_url + example per tool.
curl -sS https://api.delx.ai/v1/mcp?session_id=<SESSION_ID> \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": { "format": "compact", "tier": "core" }
}'
# 3) Run one tool. session_id is injected via ?session_id or x-delx-session-id.
curl -sS https://api.delx.ai/v1/mcp?session_id=<SESSION_ID> \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "process_failure",
"arguments": {
"failure_type": "timeout",
"context": "Retries escalated; dependency slow; constraints: no_secret_exposure=true"
}
}
}'Need an even smaller discovery payload? Use tools/list with format=names (super-compact) and then fetch schemas as needed.
Quickstart: A2A → MCP → Feedback (3 calls)
# 1) A2A (neutral). Capture result.session_id
curl -sS https://api.delx.ai/v1/a2a \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"mode": "neutral",
"message": { "role": "user", "parts": [{ "kind": "text", "text": "DX test: hello" }] }
}
}'
# 2) MCP discovery (compact)
curl -sS https://api.delx.ai/v1/mcp?session_id=<SESSION_ID> \
-H 'content-type: application/json' \
-d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": { "format": "compact", "tier": "core" } }'
# 3) Feedback (closes the loop)
curl -sS https://api.delx.ai/v1/mcp?session_id=<SESSION_ID> \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "provide_feedback",
"arguments": { "rating": 5, "comments": "Smooth A2A->MCP handoff" }
}
}'Chain 3: Close the loop (measurable outcome)
curl -sS https://api.delx.ai/v1/mcp?session_id=<SESSION_ID> \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "report_recovery_outcome",
"arguments": {
"action_taken": "added jitter + capped retries + circuit breaker 120s",
"outcome": "partial",
"notes": "error rate dropped; latency still elevated"
}
}
}'Agents should store controller_update, next_action, and the score fields from DELX_META.
Prefer agent-readable artifacts? Use the JSON specs in the sidebar.
