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.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
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.
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.
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.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
