ByteCosts
mcp-tool-definition-token-cost.mdx

AI Coding Agents

How to Estimate MCP Tool Schema Overhead

MCP tool schema overhead is the input cost of model-visible tool names, descriptions, and argument schemas. When a client includes those definitions on every model turn, price their first write or fresh input and their later cache reads. Reduce the default tool set, shorten definitions, or fetch full schemas on demand, then account for any extra discovery turns.

Measure the definitions your model receives

A server advertises a set of tools. A client can discover those tools and decide which definitions to give the model. The model-visible definition can include a name, a description, and a nested schema for arguments. The client may also add instructions about how or when to call the tool. In an eager-loading setup that includes the full enabled set on every model request, the model receives those definitions again even on turns that invoke none of them. The MCP discovery exchange and the model request are separate events. A client can remember the definitions from discovery and still put them in each prompt. mcp-compressor’s description of schema overhead

Capture the effective tool list on a normal request and on a later request during the same task. Include native tools, MCP tools, and tools injected by a gateway or plugin in the inventory. Identify which definitions came from the server you want to evaluate. If you can inspect the request safely, estimate tokens for the actual serialized definitions with the model’s tokenizer where available. A count of bytes or characters can show which entry is large, while the provider’s usage determines what it billed. Remove sensitive payload values from any trace you share.

If you cannot get exact attribution from a request, compare matched inputs with the target tool set enabled and disabled. Use the same model and prompt and record the actual tool definitions, steering instructions, and cache usage that change. Treat the difference as the configuration’s marginal input cost. It may include prose added by the host or a changed cache boundary. A full task trial can then show how that fixed overhead interacts with tool choice, returned data, and success.

PayloadWhere it entersWhat to compare
DefinitionTool list assembled for the modelSchema size, enabled set, and repeated input by billing category
Call argumentsModel generation specifying a tool invocationOutput usage and retries after invalid arguments
ResultFollow-up model input after tool executionReturned text or structured data, including repeated history
Discovery or retrievalCalls to list capabilities or load a selected schemaExtra model turns and how long the returned definition stays in context

Price a cold write and a warm continuation

For this estimate, use the committed November 30, 2026 rates for Anthropic’s claude-sonnet-5-5. Fresh input is $2, cache reads are $0.10, cache writes are $2.50, and output is $10 per million tokens. For each bucket, multiply tokens by its rate, sum the products, and divide by 1,000,000. The calculation below isolates the definitions and assumes the other parts of the requests are unchanged. Current provider rates

Assume an eager catalog takes 10,000 tokens and a reduced catalog takes 2,000. Assume ten model requests use that catalog. In the warm scenario, the provider bills the catalog as a write on the first request and as a read on each of the nine following requests. In the fresh scenario, the entire catalog is billed as fresh input every time. These are modeling assumptions. A real cache boundary may group the schema list with instructions or other parts of the request.

Assumed scenarioEstimated cost of the definitions
Eager catalog, fresh on each turn(10 × 10,000 × $2) ÷ 1,000,000 = $0.200
Reduced catalog, fresh on each turn(10 × 2,000 × $2) ÷ 1,000,000 = $0.040
Eager catalog, one write and nine reads(10,000 × $2.50 + 9 × 10,000 × $0.10) ÷ 1,000,000 = $0.034
Reduced catalog, one write and nine reads(2,000 × $2.50 + 9 × 2,000 × $0.10) ÷ 1,000,000 = $0.0068

The reduction saves an estimated $0.160 in the all-fresh case and $0.0272 in the warm case. A shorter catalog also frees context space. Cache reads can make the recurring dollar savings smaller while the space savings remain. For your agent, check which requests recorded message or tool-list reuse. If you regularly switch the catalog mid-session, estimate the cost of replacement writes before assuming the warm case applies. Context compression versus prompt caching

A gateway that loads a full schema on demand can spend some of that saving on discovery. Assume an additional model request reads 100,000 cached tokens and adds 2,000 fresh tokens, including the expanded schema. Assume 1,000 output tokens of additional generation across the lookup and continuation, with no additional cache writes. Its estimated charge is (100,000 × $0.10 + 2,000 × $2 + 1,000 × $10) ÷ 1,000,000 = $0.024. That leaves an estimated $0.0032 of the warm-case saving. Another lookup with the same usage would exceed it. If the selected schema stays in later history, price that carriage as well. If a client can select the required tool before generation, it may avoid a model-directed discovery turn altogether.

Reduce the default list before changing the call pattern

Start with the tools a representative task actually invokes. Give unrelated jobs different presets if the client supports them. A workflow that only needs repository status and tests has little use for the full definition set for deployment, container operations, or remote issue tracking. When you add a tool for a new capability, run acceptance checks that depend on it and check whether its schema becomes part of the stable prefix.

Pare’s README documents per-server and universal filters for tool registration. The project also returns structured results from developer tools. Those are separate opportunities for savings. Filter registration to remove unused definitions from a model-visible list. Measure structured tool responses separately to check whether they shorten the input after a call. Verify all required tools remain available and that limited output carries enough evidence for the task. Pare tool filters and structured results

If you maintain the server, shorten verbose descriptions and redundant examples while preserving argument and validation details the model needs. Check required fields, valid values, and tool selection on similar names. A smaller schema that causes invalid arguments can trigger full follow-up requests. For a specialized task, keeping a small set of accurately described tools can avoid both a large catalog and repeated discovery.

Load full schemas on demand for broad catalogs

mcp-compressor’s README describes a proxy that starts with a compressed surface, lets the model request the full schema for a selected tool, and then invokes the tool. It also describes filtering and output encoding. Use the schema lookup path when the task uses only a small part of a broad backend catalog. Evaluate the model’s ability to locate the right tool from the compact view, understand its full schema, and successfully call it. mcp-compressor review

mcptoon documents a compact name index and a way to inspect the full schema on demand. The project reports reductions in its measured catalog representation. Those figures describe its own token counts and the representation it tested. In a deployment, count the definitions or index actually included, subsequent full-schema lookups, and any extra model output. mcptoon also describes encoding tool results. Measure that benefit against result usage independently from the catalog reduction. mcptoon review

context-mode shows a related trade for large result payloads. The agent can execute locally and ask for useful passages from an indexed result, so full logs need not enter the prompt. Its tools and any adapter steering that reaches the model still take space. Compare schema overhead with the removed result text over complete tasks. Usage from the indexed search path includes both the definition and the search result when the host sends them. context-mode

Separate stable tools from tools discovered mid-task

A client can start with a small set of tools and select a specialist when the task needs it. Inspect whether that selection loads full definitions into the active tool list or adds the schema as a tool result in conversation history. The first design can alter reuse of a tool-bearing prefix. The second can keep the schema in later messages even when the specialist is finished. The request trace can show the point at which the schema appears and whether it stays.

For recurring work with the same small set, compare loading those tools at the start with discovering them on demand. A search or lookup that happens on almost every task may be more expensive than carrying the definitions from the beginning. If unrelated tools are rarely used, preserve a compact discovery surface for those and warm the common catalog in the ordinary flow. Observe cache usage after making the selection so you can price a change mid-task.

Treat tool names and descriptions as part of the interface the model uses to decide what to call. In a compact index, similarly named tools can require an extra inspection step. Check whether a task that calls several related tools can reuse what it learned earlier or must request each schema afresh. If the caller can supply a workload label before generation, try filtering at that boundary and measure whether selection and argument validity improve on the same tasks.

Also verify the response envelope on gateways that alter both definitions and results. The client still has to accept the returned structure. Test a typical call with required fields and a case that returns a validation error. Retain the actual error in the trace and include any retry it triggers in the cost ledger. A shorter catalog only helps when the working tool calls carry the task through to an accepted result.

Keep a task-level ledger after the change

Compare a small fixed catalog, your full catalog, and an on-demand catalog if you expect all of those to be viable. Use the same starting repo, model, task, and acceptance rubric. Verify enabled tools at discovery and inspect the actual definitions sent on the next provider call. Capture cache writes when establishing the tool list and watch for subsequent reads. Check whether the model requests the same schema repeatedly or leaves it in history long after invoking the tool.

For each attempt, sum provider input by billing category, output, and any additional charges for the route. Count lookup turns and retries for bad arguments, and record elapsed time and pass rate. Test an ordinary task needing a common tool, a task requiring a rarely used tool, and a workflow that calls several related tools. Keep failed attempts in the cost comparison so a small catalog gets credit only when the agent can still finish the job.

If common tasks can run with a stable filtered catalog, use that as the baseline for any gateway trial. An on-demand schema path is most attractive when the full set is large, selection is reliable, and lookups rarely add model turns. Where an already warm cache makes the eager list cheap, compare the saved context space with the latency and cost of looking up definitions. Keep the configuration that delivers the required tools at the lowest measured cost per accepted task within your latency budget.

Sources

Interactive report

  • The Tool Tax: Connecting a tool server can make the very next request bigger, even if the agent never calls it. Follow the cost of the catalog, the search, and the results that come back.

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

How to Estimate MCP Tool Schema Overhead. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/mcp-tool-definition-token-cost/

Sources