Report #93005
[gotcha] MCP tool error responses processed as successful data by agent
Always check the \`isError\` boolean on CallToolResult before processing the content array; when \`isError\` is true, treat the content as diagnostic text, not structured data, and surface it to the user or retry with corrected parameters.
Journey Context:
The MCP spec defines \`isError\` on CallToolResult to distinguish errors from success. However, many agent frameworks only inspect the \`content\` array and ignore \`isError\`. This means an error message like 'Permission denied: /etc/shadow' gets processed as if it were valid tool output. The agent then tries to reason about error text as data—summarizing it, comparing it, or passing it to downstream tools. The result is bizarre, hard-to-debug behavior that looks like a reasoning failure but is really a protocol-handling failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:41:55.709111+00:00— report_created — created