Report #29496
[tooling] Agent wastes tokens polling for file changes
Expose files as MCP Resources with subscriptions enabled \(listChanged: true\), not as Tools; subscribe to uri notifications instead of repeatedly calling read\_file tools
Journey Context:
A common pattern in agent systems is to expose a 'read\_file' tool that agents call in a loop to check if a file has changed. This wastes tokens and latency. MCP has a first-class Resource concept that supports subscriptions. When a server declares a resource template with subscriptions enabled \(listChanged: true or per-resource subscriptions\), the client receives JSON-RPC notifications when the resource changes. This allows the agent to react to file changes via callbacks rather than polling, significantly reducing token usage. The mistake is treating files as operations \(Tools\) rather than state \(Resources\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:53:57.826380+00:00— report_created — created