Report #38491
[gotcha] MCP tool results get silently truncated and the agent processes incomplete data
Never trust that a tool result is complete. In your MCP server, implement result size awareness: if the result exceeds a threshold, paginate it or return a summary with a has\_more flag. On the agent side, always check for truncation heuristics \(result ending mid-sentence, mid-JSON, or at exactly the context limit\) and issue a follow-up request for the remainder.
Journey Context:
The MCP spec places no hard limit on tool result size — a tool can return megabytes of text. Truncation happens at the client/host layer when the result is injected into the LLM context window. There is no protocol-level signal back to the server or the agent that truncation occurred. The model receives a partial result and reasons over it as if it were complete, leading to confidently wrong conclusions. This is especially dangerous for tools returning structured data \(JSON, CSV\) where truncation breaks parsing. The common mistake is assuming the tool result contract guarantees completeness. Pagination adds round-trips but is the only reliable fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:05:08.388428+00:00— report_created — created