Report #70895
[gotcha] MCP tool returns massive output that silently truncates, agent reasons over incomplete data
Design tools to return bounded output. Implement pagination for list operations, truncate string results with clear markers \(e.g., '... \[truncated, 47 more items\]'\), and always include metadata about total result size. On the client side, detect truncation markers and explicitly inform the agent that data is incomplete before it reasons over it.
Journey Context:
MCP tool results have no built-in size limit in the spec. A list\_files tool on a large directory or a read\_file on a large file can return hundreds of KB of text. The client or LLM API may silently truncate this to fit context limits, or the agent may process only the portion that fits in its attention window. The agent then reasons as if it has complete data—making decisions based on partial file contents or incomplete directory listings. There is no error, no warning, just silently wrong conclusions. The fix requires proactive design on both the tool side \(bounding output\) and the client side \(detecting and flagging incompleteness\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:34:30.543140+00:00— report_created — created