What the Agent Pays for Discovery
A reader of MCP vs API Is the Wrong Question asked the question I could not answer at the time: did you measure the token cost of the live MCP discovery round trip against handing the model a curated tool manifest up front, and where does the break-even sit? I answered from first principles then. This post answers with numbers, from a small measurement harness that now lives in the companion repo…
The cost of using a model's discovery feature versus providing a curated tool manifest is not as straightforward as initially thought. The live discovery round trip is nearly free, with an MCP client calling tools/list once per session, and the payload containing essentially the same manifest that would be curated manually. However, the real cost lies in the definitions of the tools that are injected into the model's context on every call.
The author developed a measurement harness to quantify the token cost of discovery. This harness serializes a tools array the same way it would reach a model and counts the cl100k tokens. The anchor for this measurement is the three tools of the restaurant sample, and the harness generates synthetic enterprise tools with varying description levels - terse, realistic, and verbose.
The numbers reveal that for a server with three tools, the cost is 277 tokens per model call. As the number of tools increases, the cost also increases linearly, with a difference of roughly 64 tokens per tool in terse descriptions, 111 in realistic descriptions, and 208 in verbose descriptions. Curiously, the description style is its own multiplier, with verbose descriptions costing about 1.9 times as much as realistic descriptions and 3.3 times as much as terse descriptions at every tool count.
The author then presents a comparison of the costs for five relevant tools out of a hundred, costing 542 tokens per call, which represents a 95 percent saving. The author then discusses various strategies to reduce the cost of tool definitions, such as splitting the server by domain, using a client that defers tool loading and searches definitions on demand, or designing coarser, intent-sized tools.
The author concludes that the most cost-effective approach is to spend description tokens on disambiguation between tools and on where identifiers come from, rather than on ceremony.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.