Tool-cost CI check for MCP servers catches schema growth hidden by token totals
A developer guide describes a reproducible CI check for MCP tool definitions that measures total tokens, descriptions and input schemas separately. It uses an observed remote change to textokit's endpoint, where a 20-tool list lost about 32% of its counted tokens overall, mostly from shorter descriptions. The article provides a full fetch script that verifies canonical digests of the public tool lists before comparing them. Commands use pinned versions of the aimarket-histor CLI and tiktoken, and the author notes this is their own reproducibility check rather than external adoption. The check exits with code 0 when the increase stays within a configured threshold of 10%.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in