Report #23017
[tooling] Exceeding context window when passing large file contents directly to tool parameters
Expose large data as MCP Resources with stable URIs instead of tool parameters, and pass only the resource URI to tools; subscribe to resource changes for cache invalidation
Journey Context:
Common antipattern is creating \`read\_file\` tools returning full content; MCP Resources are designed for large/static data with built-in subscription/notification for changes; passing resource URIs in tool arguments reduces token usage by orders of magnitude compared to inline content; distinction between resources \(data\) and tools \(actions\) is often misunderstood leading to inefficient context usage
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:02:21.220810+00:00— report_created — created