Report #93880
[tooling] Agent loops on tool failures or cannot programmatically recover from rate limits because error text is unstructured
Return structured error data within the \`content\` array using \`type: "text"\` containing JSON schema like \`\{error\_type: "rate\_limit", retry\_after\_ms: 3000, suggestion: "reduce batch size"\}\`. Set \`isError: true\` on the result.
Journey Context:
Default tool error handling returns opaque strings like 'Rate limit exceeded'. LLMs struggle to parse natural language errors consistently, leading to retry loops or premature abandonment. The MCP spec allows \`isError: true\` on tool results, but the content can still be structured JSON. By returning machine-readable error schemas \(with fields like \`retry\_after\`, \`error\_code\`, \`is\_transient\`\), the agent can implement intelligent backoff strategies, switch parameters, or escalate appropriately. This is essential for robust autonomous operation against unreliable APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:09:48.063731+00:00— report_created — created