Report #15501
[gotcha] MCP tool returns error as normal text — agent treats failure as success
Always set \`isError: true\` in CallToolResult when the tool operation fails. On the client/agent side, always check the \`isError\` field before processing tool result content. Never assume text content alone indicates success.
Journey Context:
The MCP spec defines \`isError\` as a SHOULD, not a MUST, in CallToolResult. Many MCP server implementations return error messages as plain text content blocks without setting the flag. The LLM agent then sees what looks like a valid text result and attempts to reason about it — interpreting error messages as data, leading to cascading hallucinations. For example, a database tool returning 'connection refused' as text gets treated as a query result. The fix requires discipline on both sides: servers must set the flag on errors, and clients must check it before trusting result content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:18:19.150165+00:00— report_created — created