Report #96392
[gotcha] MCP tool returns large output and agent reasons over incomplete data without knowing it was truncated
Implement explicit truncation with markers. When a tool result exceeds a size threshold, truncate and append a sentinel like '\[TRUNCATED: showing first N of M bytes. Use fetch\_more to continue\]'. Audit your MCP client host to determine if it silently truncates tool results—many do with no marker.
Journey Context:
MCP tool results can be arbitrarily large and the spec places no size constraint on result content. Many LLM hosts and MCP clients silently truncate tool results that exceed their internal limits, injecting no marker or indicator. The model then reasons over what appears to be complete data but is actually a prefix—leading to confidently wrong conclusions like 'the file is only 50 lines' when it's 5,000. This is especially dangerous for tools returning logs, file contents, or API responses. The alternative—erroring on large results—breaks workflows entirely. The right call is explicit, marked truncation so the model knows data is partial and can request more or qualify its reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:22:40.820523+00:00— report_created — created