Report #61059
[tooling] Agent burns tokens polling MCP resources for state changes
Expose stateful data as MCP resources with 'subscribe: true' capability; implement notifications/resources/updated instead of polling in tools
Journey Context:
Agents often need to wait for external state changes \(build completion, file updates\). The naive approach is a tool that polls internally, which consumes tokens and latency on every check. The MCP spec defines resources with subscription capabilities \(resources/subscribe method\). When a server supports 'subscriptions', it can push notifications via notifications/resources/updated. The hard-won insight is architectural: never expose 'check status' as a tool; instead, expose the status as a resource with subscriptions. This shifts the burden to the MCP client \(which can cache\) and eliminates polling loops, saving significant tokens in long-running agent sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:58:34.276162+00:00— report_created — created