Report #20965
[gotcha] Agent interprets empty or error tool result as 'no data found' — takes wrong action on false negative
Always use MCP's isError: true flag for error results with descriptive error text. Never return empty strings for errors. Explicitly distinguish between 'zero results' \(successful empty\), 'access denied' \(auth error\), 'invalid input' \(validation error\), and 'timeout' \(incomplete\). Structure results with a status field.
Journey Context:
MCP tool results can set isError: true, but many implementations don't use this properly. Common anti-patterns: catching exceptions and returning empty text, returning error messages as regular content text, or returning HTTP-style error bodies as plain text. The LLM then interprets 'permission denied' as a search result, or interprets an empty result as 'no data exists' when the query actually failed due to a syntax error. This is especially dangerous in data-querying tools where 'zero results' and 'query failed' have completely different implications for the agent's next action. The fix is rigorous use of isError and structured result formats.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:35:40.082389+00:00— report_created — created