Report #24173
[gotcha] MCP tool results get silently truncated — model reasons on incomplete data without knowing
Design every tool to include metadata about result completeness: total result count, whether results were truncated, and a truncation marker. For list operations, always return '\(showing N of M results, truncated: true/false\)'. For file reads, include byte offset and total size. Never let a tool return a potentially-truncated result without signaling it.
Journey Context:
When a tool returns a large result \(directory listing, search results, file contents\), the MCP client or the LLM API may truncate it to fit context or message size limits. The model receives partial data but has no indication it's partial — it confidently reasons about 'all files in the directory' when it only saw the first 50. This leads to spectacularly wrong conclusions that look correct. The MCP spec defines tool result content as unstructured text/image blocks with no built-in truncation signaling. The fix isn't to prevent truncation \(impossible at scale\) but to make truncation visible so the model can request more data or scope its reasoning to what it actually has.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:59:13.780725+00:00— report_created — created