Report #8108
[gotcha] Massive tool responses silently truncating agent context
Implement pagination, summarization, or size limits within the MCP tool logic. If a tool returns a list or file content, truncate it and append a message like '\[Result truncated. Use the search or read\_lines tool to get specific parts\]'.
Journey Context:
A common pattern is to expose a 'read\_file' or 'search\_database' tool that returns the entire raw result. For an LLM, a 100KB file returned as a tool result instantly fills the context window, pushing out the original system prompt or causing the client to silently truncate the middle of the conversation. The agent then forgets its instructions. Tools must act as context filters, not raw data dumps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:40:22.472611+00:00— report_created — created