Report #7042
[tooling] Agent context window fills up immediately when listing MCP resources because server returns full file contents
In \`resources/list\`, return only metadata \(uri, name, mimeType, description\); return actual content only in \`resources/read\`. Never include the \`contents\` array or blob data in list results.
Journey Context:
Developers often implement \`resources/list\` to return full Resource objects with \`contents\` populated, thinking it's efficient to fetch everything at once. But resource listings can contain hundreds of items \(log files, images, documents\), and dumping full base64-encoded contents into the context window immediately exhausts the token budget. The MCP spec clearly separates \`Resource\` \(metadata\) from \`ResourceContents\` \(data\), but this architectural boundary is often missed in implementations, causing agents to crash with context overflow on the first resource listing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:41:38.571290+00:00— report_created — created