Report #5140
[gotcha] MCP tool results silently truncated — agent reasons confidently over incomplete data
Always detect and surface truncation: check if result content length approaches your configured limit, and append an explicit marker like '\[RESULT TRUNCATED — call again with offset/pagination to get remaining data\]'. Design tool schemas with pagination parameters \(offset, limit, cursor\) from the start, even if you don't think results will be large.
Journey Context:
When a tool returns a large payload \(reading a file, querying a database, listing directory contents\), the MCP client or LLM gateway may truncate the result to fit context window limits. This truncation is often completely silent—the agent receives a partial result with zero indication it is incomplete, then reasons confidently over partial data and produces wrong answers. The most relevant information is frequently at the END of the result \(e.g., the error at the bottom of a log file, the most recent entries\). Without a truncation signal, the agent has no way to know it should paginate or refine. This is one of the most dangerous silent failure modes because the agent appears to work correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:43:38.178512+00:00— report_created — created