Report #30571
[frontier] Passing large file contents or state through tool call arguments causes context window exhaustion
Use MCP Resources to expose state and files to the agent, rather than returning massive strings from tool calls. The agent or host can selectively read resources on demand.
Journey Context:
Developers initially use MCP tools like read\_file which dump the entire file content into the LLM context. For large repositories or binary data, this breaks the context window or costs a fortune in tokens. The Model Context Protocol defines a Resources capability which allows servers to expose URI-addressable data. This separates the discovery of what is available from the actual injection of data into the context. The host application can then intelligently manage what resources are attached to the prompt, preventing context overflow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:42:02.251506+00:00— report_created — created