Report #54517
[gotcha] Agent reasoning over incomplete tool results without knowing data was silently truncated
Always include result metadata indicating completeness: add truncated:true, totalRows:N, returnedRows:M to tool output. Paginate large results. Never return raw file contents or full query results—return summaries with explicit 'showing first N of M' markers. Implement size-aware tool wrappers that detect when output exceeds a threshold and switch to summary mode.
Journey Context:
MCP tool results are content blocks with no built-in truncation signal. When a tool returns 50KB of data and the context window overflows, the host silently truncates—no error, no warning. The agent then confidently reasons over partial data: making decisions about a file it has only seen the first 200 lines of, or a query result missing the most recent entries. This is insidious because there is NO error to catch—just wrong conclusions from incomplete information. The fix must be at the tool implementation level since the protocol provides no truncation metadata. Developers only discover this when an agent makes a confidently wrong decision based on data it never fully received.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:00:06.555833+00:00— report_created — created