Blog / Tool results and errors
How much of your MCP output is waste? Measuring context pollution in agent runs
“Agents waste most of their context on tool output” is a common claim. We measured it with explicit rules and a hand check. The honest answer: clear-cut waste is small, the fuzzy kind is bigger, and one design mistake dominates.
What counts as waste
We classified every MCP result token that entered the model's context, first rule wins:
- Identical repeat: same tool, same arguments, same result as before in the run.
- Oversized error: an error over 1,000 tokens.
- Refusal guidance: boilerplate telling the agent to stop and ask the user.
- Self-generated events: the agent's own tool calls, logged back to it as activity.
- Hidden-stage records the run didn't use.
- Unreferenced records: records whose distinctive values (IDs, names, numbers) never appear in the answer or any later model text or tool call.
Classes 1–5 are strict waste. Class 6 is fuzzy, so strict + 6 is an upper bound.
What we found
Share of the largest single request, averaged per run (bars scaled to 50%). In cumulative input the live figures were 0.1% strict and 9.0% upper. MCP results themselves were 12–46% of the largest request; see MCP context window usage.
Measure the waste in your MCP output.
We classify every token your server returns in real agent runs and show which tools and fields to cut.
The feed full of footprints
The server's “what happened since” tool logged every MCP tool call as an event. With a limit of 200, 200 events came back and 152 were this same connection's own tool calls. The response was 98,512 tokens. In the runs that read it, those events were about 4k tokens per run, almost all of the 7.1% strict waste.
Fix: leave the caller's own tool-call events out by default, behind a filter.
Unread records: the fuzzy share
Typical cases: 49 other records returned when the user asked about one, and long strategy blocks nobody read. But string matching misses paraphrase, counting and summing. A hand check of 5 runs found the rule 62% precise, overstating the upper bound by 6.9 points on average, and just 1% precise on a summarising job. Scaled by that, live unread waste is roughly 8%: an estimate, not a measurement.
Fixes are the same as for size: filters, small defaults, summaries. See reduce tool response size.
How to measure yours
- Record MCP results as the model saw them, after any app truncation.
- Apply the strict rules; report strict and upper bound separately.
- Hand-check a few runs, including a summarising job, before trusting the upper bound.
- Look for duplicates: identical repeats are rare, but repeat calls with new arguments aren't waste. See why agents call the same tool twice.
Go deeper: The 12,689-token typo, Agent refusal states, Per-task cost, Claude Code vs Codex.
Back to tool results and errors for agents.
How we measured
- Live: 40 Codex CLI 0.161.0 runs of 8 read jobs plus 10 earlier runs of 2 jobs, on a 99-tool production MCP server through a read-only proxy, 16 Oct 2026; tokens by o200k_base.
- Mock: 150 runs on a live-shaped mock, for comparison.
- Hand check: 5 runs, every flagged record judged needed or not; strict rules agreed on all 5 (in-sample). False negatives weren't measured systematically.
- Limits: one workspace, read-heavy jobs, one day.
FAQ
How do I measure wasted tokens in agent tool results?
Split every MCP result that enters the model's context into classes with explicit rules: identical repeats, oversized errors, refusal guidance, self-generated events, and records never referenced later. Report the clear-cut classes as strict waste and unreferenced records only as an upper bound, and hand-check a few runs.
Is most MCP output wasted?
Not in our runs. Clear-cut waste was 0.2% of the largest request in live runs. Unreferenced records reached 12.5%, but about 38% of those were actually used through paraphrase, counts or sums.
What was the biggest source of waste?
An activity feed that logged the agent's own tool calls as events. In one call 152 of 200 events were the connection's own calls; in runs that read it, strict waste rose to 7.1%.
Measure the waste in your MCP output.
We classify every token your server returns in real agent runs and show which tools and fields to cut.