Report #7549
[gotcha] Agent reasons confidently on truncated tool results without knowing data was cut off
Implement a client-side wrapper that checks every MCP tool result against a size threshold and appends an explicit truncation marker — e.g., '\[RESULT TRUNCATED — N more items omitted. Call again with a narrower query.\]' In your tool descriptions, instruct the model to look for this marker and react to it.
Journey Context:
MCP tool results can be arbitrarily large: file reads, database dumps, search hits. The MCP spec provides an isError boolean but no truncation signal. When the host or client silently truncates a result to fit the context window, the model receives what looks like a complete, well-formed response. It then reasons on partial data with full confidence — arguably the most dangerous silent failure mode in agentic systems. The alternative of raising an error on truncation is worse because it prevents the model from using the partial result at all. The right tradeoff is to deliver the partial result but make the truncation self-describing so the model can decide whether to narrow the query or proceed with what it has.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:09:52.732391+00:00— report_created — created