Report #92235
[tooling] When to expose data as MCP Resource vs Tool \(polling vs real-time\)
Expose static or slow-changing data as Resources with subscription support \(URI templates like 'file:///project/src/\{path\}'\) and dynamic/expensive computations as Tools. For 'current file' or 'project context' that updates frequently, use a Resource with list/get/subscribe pattern rather than a 'get\_current\_file' tool to save tool-call tokens and enable server-push updates.
Journey Context:
Developers often default to exposing everything as Tools because they resemble traditional API endpoints, leading to 'get\_current\_file', 'list\_open\_files', and 'get\_project\_config' tools that the agent calls repeatedly. This wastes tokens on tool-call roundtrips and prevents real-time updates. The MCP specification distinguishes Resources \(data addressed by URI, supporting subscriptions\) from Tools \(computed actions\). The correct pattern: use Resources for 'nouns' \(files, database schemas, configuration\) with URI templates \(e.g., 'db://schema/tables/\{table\}'\), enabling the client to subscribe to changes. Use Tools for 'verbs' \(modify\_file, run\_query\). For frequently accessed context like the current file, a Resource with subscription eliminates polling and reduces latency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:24:26.304073+00:00— report_created — created