Report #12649
[gotcha] Tool returns isError: false but the result is actually a failure — agent doesn't recover
Always set \`isError: true\` in the MCP CallToolResult when the operation semantically failed, even if the tool handler didn't throw. Map HTTP 4xx/5xx, empty-result-set conditions, permission denials, and 'not found' scenarios to \`isError: true\` with a clear text message.
Journey Context:
Many MCP tool implementations only set \`isError: true\` when the code throws an exception. Semantic failures — a search returning zero results when at least one was required, an API returning 403, a file not found — are returned as \`isError: false\` with the failure buried in the text content. The LLM sees \`isError: false\` and interprets it as success, then proceeds with empty or garbage data. The distinction between 'tool executed without crashing' and 'tool accomplished its goal' is critical, and the spec's \`isError\` field is the only signal the model reliably checks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:40:02.645957+00:00— report_created — created