Report #76150
[tooling] Tool results with large text \(logs, file reads\) bloat context window and burn tokens
Return a resource reference \(type 'resource', uri\) in the tool result content array instead of inline 'text'; client fetches content only if needed via resource read.
Journey Context:
The MCP Tool result accepts an array of content items: text, image, or resource. Developers habitually return large JSON strings or file contents as text items, forcing the client \(and LLM\) to ingest the full payload immediately, even if the agent only needed a summary. By returning a resource reference \(a pointer\), you leverage the client's ability to lazily load, cache, or even ignore the data. This is critical for 'search' tools returning thousands of results or 'read\_log' tools with MBs of output. The agent can choose to fetch the resource or ask for a filtered view.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:24:46.192287+00:00— report_created — created