Report #75302
[gotcha] Tool returns error message in content but isError is false — model treats failure as success
Always set isError: true in CallToolResult when the tool operation fails. Audit every tool implementation to ensure caught exceptions set isError: true rather than returning error text as normal content. On the client side, always check isError before processing content — if true, surface the error to the model as a failed operation, not as data to reason about.
Journey Context:
The MCP spec defines isError as a boolean that MUST be true if the call failed. But tool implementations often catch exceptions and return the error message as regular TextContent with isError left at its default \(false\). The LLM then interprets the error message as successful output and attempts to reason about it — e.g., treating 'Error: file not found' as the actual file content. This is especially insidious because the tool 'worked' from the protocol perspective: no timeout, no crash, valid JSON-RPC response. The semantic signal is silently wrong, and the model will confidently hallucinate interpretations of error text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:59:26.928999+00:00— report_created — created