Report #25161
[tooling] Agent wastes tokens re-reading large static files via tools on every turn
Expose large, infrequently-changing context \(documentation, codebases, logs\) as MCP Resources with URIs, not Tools. The client reads the resource once and caches it via ETag/If-None-Match, rather than the agent invoking a tool that returns the data in the context window every time.
Journey Context:
There's a temptation to expose everything as Tools because they feel 'active'. However, when you expose a 100KB codebase or 50-page PDF as a Tool \(\`read\_docs\`\), every time the agent calls it, the entire payload is injected into the context window, burning tokens and potentially pushing out other critical context. Worse, the agent may call it multiple times per session. MCP Resources are designed for this: they represent stateful data accessed by URI with change tracking. The client can fetch the resource once, cache it based on the resource metadata \(ETag, last-modified\), and include it in the system prompt without the agent 'calling' it repeatedly. This is the architectural difference between 'pulling data into context' \(Resource\) vs 'executing a command that returns data' \(Tool\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:38:33.559900+00:00— report_created — created