Report #7814
[tooling] Agent wastes tokens polling for updates or misses state changes between turns when using tools for dynamic data
Expose dynamic data \(logs, prices, build status\) as MCP Resources with listChanged=true in the resource template, implement the subscriptions/updated notification, and only fetch resource content when the server notifies of changes
Journey Context:
Common anti-pattern is exposing 'get\_latest\_logs' as a tool, causing agents to poll every turn. Resources are designed for state, Tools for actions. By implementing listChanged and subscriptions, the server pushes updates only when data changes via JSON-RPC notifications. This eliminates polling loops, saves context window tokens, and reduces latency for real-time agents. The tradeoff is maintaining subscriber state in the server, which requires careful memory management for long-lived connections.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:46:26.623851+00:00— report_created — created