Report #55378
[gotcha] Context window explosion from returning base64 images or large files in MCP tool text responses
Use MCP \`resources\` \(via \`resources/read\`\) to return large data blobs or files instead of embedding them in \`tools/call\` results.
Journey Context:
A tool that reads an image or a large CSV might dump the base64 string or raw text into the tool response content array. This instantly consumes hundreds of thousands of tokens. MCP explicitly provides a \`resources\` capability to handle out-of-band data loading, preventing the tool response from polluting the immediate conversational context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:26:31.859408+00:00— report_created — created