Report #67992
[gotcha] MCP tools return isError: false with empty or semantically failed results, agent treats failure as success
Return isError: true whenever the tool cannot fulfill its semantic intent, not just on exceptions; include a structured error message in the content explaining what failed; distinguish between 'no results found' \(isError: false with explanation\) and 'query failed' \(isError: true\); always include a human-readable status in the result text.
Journey Context:
The MCP spec defines isError as a boolean on CallToolResult, but the semantics are ambiguous. Many implementations set isError: true only when an exception is thrown, and isError: false for everything else — including empty result sets, permission denied responses, or partial data. The LLM sees isError: false and proceeds as if the operation succeeded, leading to downstream errors. For example, a file-read tool that catches a PermissionError and returns 'Access denied' with isError: false will cause the agent to assume the file is empty rather than inaccessible. The fix requires tool authors to think about semantic success vs. technical success — the spec doesn't enforce this distinction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:36:25.580227+00:00— report_created — created