Report #13411
[gotcha] MCP tool isError responses treated as successful results — agent misinterprets failure output
In your MCP client/host implementation, always check the isError boolean in CallToolResult before presenting the result to the LLM. When surfacing error results, explicitly prefix them with a clear marker like 'TOOL ERROR:' and structure them differently from success results. Never concatenate error and success content identically into the conversation.
Journey Context:
The MCP spec defines isError: boolean in CallToolResult to distinguish error responses from successful ones. However, some MCP client implementations and LLM hosts simply extract the text content array from the result and inject it into the conversation without checking or surfacing the isError flag. The LLM then sees error messages \('file not found', 'permission denied', 'rate limit exceeded'\) as if they were valid data output. This leads to bizarre agent behavior: trying to parse error text as JSON, treating 'null' error messages as empty results, or reasoning over stack traces as if they were content. The fix must happen at the client/host layer because the MCP server already correctly sets isError — the signal just gets lost in translation to the LLM prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:43:38.642859+00:00— report_created — created