CyberRouter · Context planning

MCP Tool Token Budget: Count Schemas and Results

Account for the tool definitions and results your host actually sends to the model.

Budget what reaches the model

An MCP tool token budget accounts for tool definitions and tool results included in a model request. The number of tools installed in a host is not enough to calculate it. A host can discover many tools while sending only a selection of definitions to the model.

The MCP tools specification defines discovery with tools/list and tool metadata such as names, descriptions, and input schemas. Inspect how your host translates those definitions into the model provider’s request format before estimating their cost.

A worked 128K example

Suppose a request includes 50 tool definitions averaging 350 tokens each after formatting. That is 17,500 tokens for definitions. Add 12,000 tokens of tool results still present in the conversation, giving 29,500 tool tokens.

These are illustrative counts. They are not a benchmark, a measured CyberRouter saving, or an estimate of every MCP tool’s size. Real schemas and result payloads vary substantially.

Same request with two hypothetical sets of loaded definitions
Allocation50 definitions8 definitions
Context window128,000128,000
System instructions2,0002,000
Conversation excluding tool results24,00024,000
Retrieved context8,0008,000
Tool definitions17,5002,800
Tool results12,00012,000
Output reserve8,1928,192
Safety margin: 5%6,4006,400
Tokens still available49,90864,608

If the host sends only eight relevant definitions at the same assumed average size, the combined tool allocation becomes 14,800 tokens. This example leaves 14,700 additional tokens available. It does not establish better model accuracy or guarantee that a particular host supports selective loading.

Open the 50-definition budget or open the 8-definition budget to change the assumptions.

Measure a tool budget in four steps

Inspect your tool definitions in the free MCP schema token calculator. It counts normalized JSON with a named tokenizer and shows each definition separately; provider formatting still needs separate measurement.

  1. Identify loaded definitions. Count the schemas and descriptions submitted with this request, including provider formatting overhead. Do not assume all tools returned by discovery are loaded.
  2. Count retained results. Include returned text, structured data, and provider-accounted image or document tokens present in the model’s context. Results from earlier steps may still be in history.
  3. Avoid double counting. If tool results are in your tools allocation, remove those same tokens from the conversation allocation. Both categories contribute to one shared total.
  4. Reserve space for the next step. Leave room for the reply and any expected new results. Recalculate when your host changes the selected tools or retained conversation.

For supported Claude requests, Anthropic’s token-counting endpoint accepts tool definitions and messages. It does not support the MCP connector or most server-side tools; use Messages API usage for those cases. Its counts are estimates and can differ from final usage.

Reduce overhead without losing useful information

When your host supports it, load tools relevant to the task, shorten repetitive descriptions, and retain only result fields needed for the next decision. Keep the parameter constraints, validation rules, permission checks, and approval behavior intact.

A smaller tool list is not automatically better. Removing a needed definition can prevent the model from choosing the right tool. Compare representative workflows and successful completion as well as token counts. This worksheet only calculates space; it does not execute tools or measure their quality.

Common MCP token questions

Do unused tool definitions consume tokens?

They can when the host includes them in the model request, even if the model never calls them. A tool merely registered with an MCP server is not necessarily present in model context.

Does prompt caching free context space?

Count cached content that remains in the input. Pricing and latency benefits from caching do not remove those tokens from the context window.

Can this calculate an MCP bill?

No. Context capacity and billing are different questions. Provider token rates, cache policies, and server charges need a separate cost calculation.

Accessibility

Adjust how CyberRouter looks and moves. Preferences apply to this browser.

You can also use your browser’s zoom controls.

Accessibility help

Analytics preferences

Choose anonymous page counts or optional visit, scroll and reading-time analytics. Privacy details.