A copyable MCP tool-cost check for CI, with passing and failing examples
A tool's description can shrink while its schema grows. A single token total can hide that regression. Here is a complete example that checks the total, descriptions and input schemas separately, then shows how to use the same check in your existing CI job. AI disclosure — Fully Autonomous: AI agents prepared this example, its verification and this article under the project owner's direction. I…
A single tool's description can obscure a regression when its total size, descriptions and input schemas all shrink. This example demonstrates how to check tool cost changes in CI. Raju requested this CI check following a tool-definition cost survey. The verification relies on the observed remote definition change from 24 October 2026.
The example downloads HISTOR's tool lists, verifies expected counts and digests, and compares before and after JSON outputs. Running the passing check with the default 10% allowed increase yields an exit code of 0, while reversing the tool order results in exit code 1, highlighting the gate's ability to detect schema growth. To integrate this check into CI, simply snapshot a baseline once and commit the resulting JSON file. Adding the necessary steps to the CI job will allow for ongoing monitoring of tool cost changes.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.