Report #62570
[gotcha] Tool returns error message in same format as success result and model interprets it as valid data
Always use MCP's isError flag on tool results when the operation failed. Structure results with an explicit status field. Never return error text as a bare string that could be confused with data. Example: return \{isError: true, content: 'File not found: /path/to/file'\} not just 'File not found: /path/to/file'.
Journey Context:
The MCP tool result format supports both isError: true and isError: false with the same content structure \(text/image\). If a tool returns an error as plain text without setting isError, the model may interpret 'Error: connection refused' as the actual data it was looking for and proceed with broken reasoning. This is especially dangerous with tools that return string data normally—error messages blend in. Setting isError: true allows the client/framework to handle errors differently \(display, retry, re-prompt\) and signals the model that the result is not usable data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:30:24.843221+00:00— report_created — created