Claude summarized a document after reading only the beginning: an MCP server's hidden response truncation
Claude confidently summarized a large document even though it had actually read only the beginning. The author connected mcp-server-fetch and asked the agent to pull specific passages from the text. The answer looked coherent. Inspecting the JSON-RPC traffic told a different story. The server had cut the result off at 6000 characters, marked it as successful, and appended a hidden instruction to the model at the end.
AI-processed from Habr AI; edited by Hamidun News
A developer found that Claude had confidently summarized a large document after actually reading only its beginning. The cause turned out to be silent truncation on the MCP server's side.
What the developer found
The author connected the mcp-server-fetch tool to Claude and asked the agent to extract several specific passages from a document. The model responded fluently and confidently, with nothing to suggest a problem: the output read as if the agent had worked through the entire document. Only after inspecting the JSON-RPC traffic between client and server, the raw message exchange between Claude and the connected tool, did the developer see that the document's content had been cut off at the 6000-character mark.
The server also marked the truncated response as successful, without a single error or truncation flag. As far as the protocol was concerned, the request completed normally: the response code signaled no timeout, no exceeded limit, and no other failure. The model received partial data and treated it as complete.
- Tool: mcp-server-fetch, used to retrieve web content and pass it to the model
- The response was truncated at the 6000-character mark
- The server marked the truncated response as successful, with no error flag
- At the end of the truncated text, the server appended a hidden instruction to the model
- The problem was discovered only through manual analysis of the JSON-RPC traffic between client and server
Why this is dangerous for agents
MCP (Model Context Protocol) is an open protocol that lets AI models such as Claude connect to external tools: file systems, databases, web requests. When such a tool returns truncated data without an explicit error signal, the model has no way to tell a complete response from a partial one. It simply works with what it received and produces a result with the same confidence as if it had read the whole document. From the user's side, nothing looks different: the answer is just as coherent, just as logical, and just as convincing.
The second part of the author's finding is especially troubling: at the very end of the truncated response, the server appended a text instruction addressed to the model. Formally, it is part of the content the agent interprets as data from the document. In practice, it is control text inserted by the tool itself after the real content had already ended. For a user who doesn't look under the hood of the JSON-RPC exchange and sees only the model's final answer, this substitution stays completely invisible: coherent text, a confident tone, and no visible signs of failure or unreliability.
This illustrates a broader problem in the model-tool chain: trust in a tool's output is rarely verified in practice, because the mere existence of a response is taken as proof that it is complete. Until the protocol explicitly requires signaling truncation, the burden of verification effectively falls on the developer, who has to log and cross-check the raw traffic separately rather than rely on the model's final text.
What it means
As agents built on Claude and other models increasingly rely on MCP servers to access external data, silent truncation and hidden instructions inside tool responses are becoming a practical risk to the quality and reliability of agentic systems. Developers building pipelines on MCP should build truncation checks into the tools themselves and should not trust tools blindly, even when the model's final answer looks completely convincing.
- Nov 1, 2026OpenAI Rewrites GPT Behavior Rules: Five Values and a Chain of Command
- Nov 1, 2026Google admits AI Mode cuts search revenue, shares fall 15%
- Oct 31, 2026Author puts his script before an AI jury: the verdict cost 850 thousand tokens
- Oct 31, 2026Anthropic: Fold Subagents Back Into a Single Loop — One Customer's Tasks Ran Twice as Fast
Key Questions Answered
What the developer found?
The author connected the mcp-server-fetch tool to Claude and asked the agent to extract several specific passages from a document. The model responded fluently and confidently, with nothing to suggest a problem: the output read as if the agent had worked through the entire document. Only after inspecting the JSON-RPC traffic between client and server, the raw message exchange between Claude and the connected tool, did the developer see that the document's content had been cut off at the 6000-character mark. The server also marked the truncated response as successful, withou
Why this is dangerous for agents?
MCP (Model Context Protocol) is an open protocol that lets AI models such as Claude connect to external tools: file systems, databases, web requests. When such a tool returns truncated data without an explicit error signal, the model has no way to tell a complete response from a partial one. It simply works with what it received and produces a result with the same confidence as if it had read the whole document. From the user's side, nothing looks different: the answer is just as coherent, just as logical, and just as convincing. The second part of the author's finding is e
What it means?
As agents built on Claude and other models increasingly rely on MCP servers to access external data, silent truncation and hidden instructions inside tool responses are becoming a practical risk to the quality and reliability of agentic systems. Developers building pipelines on MCP should build truncation checks into the tools themselves and should not trust tools blindly, even when the model's final answer looks completely convincing.
Delegate Deep Research, Coding & Multi-Step Workflows to Nomad Agent
Deploy autonomous task execution with Nomad Agent (agent.nomadnet.ai) — automated web research, data synthesis, code generation, and MCP tool orchestration.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.