Skip to main content

Command Palette

Search for a command to run...

Your MCP Servers Bill You on Every Request: The Tool-Definition Tax

Updated
•7 min read•View as Markdown
Your MCP Servers Bill You on Every Request: The Tool-Definition Tax

You connect a few MCP servers and your agent gains dozens of abilities. What the connection also adds is a block of text that rides along in the prompt of every single request, whether the agent uses those tools or not.

This article follows that text from the MCP spec to the invoice, with numbers from the providers' own documentation and one measurement I ran myself.

How to read it: provider behavior comes from Anthropic's and OpenAI's documentation and the MCP specification, which I read on October 10, 2026. The numbers about Anthropic's tool-search results are Anthropic's own, from its engineering blog and docs. The cost example is my arithmetic with assumed sizes. I ran no accuracy benchmark. Where a page was silent, I say so.

What the model actually receives

In MCP, a server lists its tools with a tools/list request. Each tool carries a name, an optional title, a description, and an inputSchema (JSON Schema), plus an optional outputSchema and annotations. The spec says tools are "model-controlled": the model discovers and calls them from context.

Your client then puts those definitions into the model's prompt. Both big providers say what that costs:

  • Anthropic: the price depends on "the total number of input tokens sent to the model (including in the tools parameter)". The extra tokens come from tool names, descriptions and schemas, and the API adds a hidden tool-use system prompt of 286 tokens on Sonnet 5.5, Opus 5.5 and Haiku 5.5.
  • OpenAI: function definitions "count against the model's context limit and are billed as input tokens."

So a tool is not free until it is called. It costs its definition, every request.

How big is the tax?

Anthropic's engineering post on advanced tool use gives one example setup of five MCP servers:

  • GitHub: 35 tools, about 26K tokens
  • Slack: 11 tools, about 21K tokens
  • Sentry, Grafana, Splunk: about 3K, 3K and 2K
  • Total: 58 tools, about 55K tokens before the conversation starts

Anthropic also says it saw definitions reach 134K tokens internally before optimizing. Sizes vary a lot by server, so treat 55K as one documented example, not a constant. Other sources I found give different numbers for the same GitHub server, which is a reason to measure your own.

I measured one real server. I started @modelcontextprotocol/server-filesystem, sent tools/list, and serialized the result as compact JSON in the shape a provider receives (name, description, input schema):

  • 14 tools
  • 8,001 characters
  • 4,108 of those characters (51%) are descriptions

I did not convert this to tokens. I had no API access in this session to call a token counter, and characters are not tokens. The point is the shape: roughly half of a small server's footprint is prose the model reads on every turn.

Why it is also an accuracy problem

Anthropic's tool-search docs say Claude's ability to pick the right tool "degrades once you exceed 30–50 available tools." OpenAI's function-calling guide suggests "fewer than 20 functions available at the start of a turn," and calls it a soft suggestion.

Anthropic's blog reports its own evals with tool search enabled: Opus 4 went from 49% to 74% and Opus 4.5 from 79.5% to 88.1% on an MCP evaluation. These are vendor numbers on older models, on Anthropic's own test, so read them as direction, not as a promise for your stack.

Price per task, not per request

Worked example. This is my arithmetic with assumed sizes, using Sonnet 5.5's published prices: $2 per million input tokens, $2.50 to write a 5-minute cache entry, and $0.10 to read one.

Assume an agent task of 20 model calls, with 55K tokens of tool definitions in every call (1.1M tokens in total):

  • No caching: 1.1M tokens at $2 per million is about $2.20 for definitions alone.
  • Cached, with the definitions as a stable prefix: one write (55K at $2.50 per million) is $0.14, plus 19 reads (1.05M at $0.10 per million) is $0.10. About $0.24.
  • Tool search, uncached: Anthropic says it typically cuts definition tokens by over 85 percent. Taking 85%, 20 calls carry about 165K tokens, about $0.33.

Two things stand out. Caching the definitions and deferring them land in the same range, roughly 7 to 9 times cheaper than the naive case. And the cached prefix only pays while the cache lives: the 5-minute entry has to be refreshed by traffic.

Caching does not fix accuracy. A cached 58-tool menu is still a 58-tool menu for the model to choose from.

The hidden interaction with the cache

Anthropic's caching docs list what invalidates the cache. The prefix runs tools, then system, then messages, so modifying tool definitions invalidates the entire cache. Changing tool_choice or disable_parallel_tool_use invalidates the messages cache.

This matters for MCP because the tool list is not static by contract:

  • A server may send a list_changed notification. A client that re-fetches and re-sends a different list changes the prefix.
  • The MCP spec asks servers to "return tools in a deterministic order" because it "improves LLM prompt cache hit rates." A server that returns the same tools in a shifting order can quietly break your caching.
  • Anthropic notes that for an mcp_toolset you do not control the order of tools within it, so the breakpoint goes on the toolset entry.

Fixes the docs actually offer

  1. Load fewer tools. Anthropic says to consolidate related operations (one tool with an action parameter instead of three) and to prefix names by service so groups stay clear.
  2. Defer what you rarely use. On Anthropic, set defer_loading: true and add a tool-search tool. Deferred definitions stay out of the cached prefix and are appended when discovered, so caching is preserved. Documented limits: up to 10,000 deferred tools, five matches returned by default, and a deferred tool cannot also carry cache_control (that returns a 400). Keep your 3 to 5 most-used tools loaded up front.
  3. OpenAI has a counterpart: tool_search with defer_loading and namespaces. The page says only gpt-5.4 and later support it, and it does not say how it interacts with caching.
  4. Restrict instead of rebuild. OpenAI's allowed_tools limits what is callable without changing the tool list you send, which helps prompt caching.
  5. Write shorter descriptions, but not carelessly. Anthropic's guidance is the opposite of what you would guess: it calls detailed descriptions "by far the most important factor" in tool performance. Trim by dropping tools, not by starving the descriptions of the tools you keep.

When not to bother: Anthropic says standard tool calling is a better fit with fewer than 10 tools, or when definitions are small.

A checklist you can run this week

  1. Count your tools across all connected servers, and write the number down.
  2. Read usage.input_tokens on a request that does nothing useful, such as "hi", with tools attached. That is your tax per call.
  3. Multiply by calls per task, then by price, for your real cost per task.
  4. Pin tool order and check cache_read_input_tokens stays high across turns.
  5. If you pass 10 tools or 10K tokens of definitions, try deferred loading and compare cost and correct-tool rate on 20 real tasks.
  6. Re-measure after every MCP server upgrade. Descriptions change between versions.

What I could not verify

I ran no accuracy benchmark and no end-to-end token count. My only measurement is the character size of one server's tool list. The 55K and 85% figures and the eval gains are Anthropic's, from its own post and docs. I did not read DeepSeek's or Alibaba's tool pages, so I make no claim about them. Third-party posts quote other token counts for the same servers, and I did not use them. Features like tool search, supported models and prices change, so recheck them before relying on any number.

Sources: Model Context Protocol specification, Tools (modelcontextprotocol.io). Anthropic: Tool use overview, Tool search tool, Tool use with prompt caching, Define tools, Pricing (platform.claude.com/docs); Advanced tool use (anthropic.com/engineering). OpenAI: Function calling (developers.openai.com). All accessed October 10, 2026.

How many tools does your agent load by default, and do you know what they cost per request?

#AI #MCP #LLM #AIEngineering

X
X1Y11d ago

Your "re-measure after every upgrade" step is worth automating, because it pays off three ways. Snapshot each server's tools/list output, hash it, and alert when the hash changes. That catches token creep, a reordered list that quietly drops your cache hit rate, and a description that now tells the model something new. The last one is the security case: the model reads those descriptions as instructions on every turn, so a server upgrade can change what your agent does with no code change on your side. Was the 51% description share on the filesystem server typical of the others you looked at?