Report #63958
[gotcha] Agent hallucinates or makes decisions based on incomplete data after a large MCP tool response is silently truncated
Implement explicit size checking and summarization in the MCP server before returning data. If a result exceeds a safe token threshold \(e.g., 10k tokens\), truncate it and append a prominent warning: \[RESULT TRUNCATED: Returned first 100 lines. Call read\_lines\(start, end\) for specific sections\].
Journey Context:
MCP clients often have hard limits on tool response sizes and will silently truncate JSON-RPC responses that exceed them. The LLM receives a partial file or database dump with no indication it is incomplete, leading to high-confidence hallucinations based on missing data. Relying on the client to warn the LLM about truncation fails because the client truncates before the LLM sees it. The server must own the truncation logic and explicitly communicate the data boundary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:50:32.389554+00:00— report_created — created