Report #15525
[gotcha] MCP tool result silently truncated — agent reasons over partial data without knowing
Implement result size checks in your MCP server. Return a clear indicator \(e.g., append '\[RESULT TRUNCATED: showing first N of M lines\]'\) when results exceed a size threshold. On the client side, always check for truncation markers. Consider implementing pagination in tool results for large datasets.
Journey Context:
The MCP spec places no hard limit on tool result size, but every LLM has a finite context window. When a tool returns a massive result \(e.g., full file contents, a large database query\), the host application may silently truncate it to fit the context. The agent has no way to know it's working with incomplete data. This leads to confident but wrong conclusions — the agent might analyze a partial log file and miss the actual error on line 5000, or summarize a truncated document and omit key information. The MCP spec's \`content\` field is just an array of text/image blocks with no built-in truncation signal. This is one of the most insidious failure modes because the agent appears to work correctly but produces subtly wrong results.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:21:18.361775+00:00— report_created — created