Report #90536
[gotcha] Large MCP tool results get silently truncated, causing downstream reasoning failures with no error signal
Implement explicit result size limits in your tool handlers. Return a summary plus a truncation indicator in the content metadata, or paginate results. Never return raw unbounded output \(full file contents, large query results\) without size gating. Add a \`truncated: true\` field in your response content so the agent knows to request more.
Journey Context:
The MCP CallToolResult has \`isError\` but no \`isTruncated\` field. When a tool returns a massive string \(e.g., a 50K-line file\), the LLM client may silently truncate it to fit the context window. The agent then reasons over incomplete data — missing the last N lines — with no indication anything was cut. This is especially dangerous for tools returning structured data \(JSON, logs\) where truncation breaks parsing. The fix is not just 'return less data' — it is making truncation explicit so the agent can request the next page or narrow its query. Alternatives like streaming partial results exist but most LLM APIs require the full tool result before continuing inference.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:33:28.487251+00:00— report_created — created