Versioning AI Agent Tools Without Breaking Callers
A tool definition handed to an LLM is an API contract. The dangerous change is not renaming a parameter — it is keeping the name and changing what it means.
📜 Table of Contents
- Three kinds of change, three different risks
- The rules that prevent most of this
- When a breaking change is unavoidable
- Stage 1: run both, deprecate one
- Stage 2: instrument the old path
- Stage 3: remove, on a date you announced
- Versioning the whole toolset
- What MCP changes
- Testing the contract
- The checklist
📖 Keep reading
A tool definition handed to an LLM is an API contract. It has parameters, types, and semantics, and something on the other side calls it with values that assume those things are stable. Most teams version their HTTP API carefully and then change tool schemas in production without a second thought, because the caller is "just a model."
The model is not the problem. The problem is every agent, workflow, and saved prompt that was built against the old definition.

Three kinds of change, three different risks
| Change | Example | Risk |
|---|---|---|
| Additive | New optional parameter with a default | Low — old calls still work |
| Semantic | Same parameter name, different meaning | High — silent wrong behaviour |
| Structural | Rename, remove, or change a type | High — calls fail loudly |
The additive case is genuinely safe and needs no versioning. The structural case is annoying but self-announcing: the call errors, someone notices. The semantic change is the one that hurts, because a caller passing limit=10 still gets a 200 and now means something different.
A concrete example: a search tool where limit used to mean "number of results" and now means "number of results per source." Nothing breaks. Every caller silently gets five times the results and a bill to match.
The rules that prevent most of this
Never reuse a parameter name with a new meaning. If the semantics change, the name changes. This is the single highest-value rule here, and it is the one teams break most often because renaming feels disruptive.
Add, do not modify. New behaviour goes in a new optional parameter with a default that preserves the old behaviour. Old callers keep working by construction.
Types are contracts. Changing string to integer, or accepting a list where a scalar was accepted, is a structural change even though the parameter name survived.
When a breaking change is unavoidable
Sometimes the tool is genuinely wrong and must change. The versioning approach that works with LLM callers has three stages.
Stage 1: run both, deprecate one
{
"name": "search_v1",
"description": "DEPRECATED — use search_v2. Returns N total results.",
...
},
{
"name": "search_v2",
"description": "Returns up to N results per source.",
...
}
Both tools are exposed simultaneously. The old one stays functional. Its description says it is deprecated, in the first sentence, because that is the part a model actually reads.
Stage 2: instrument the old path
Count calls to search_v1. You cannot retire it until the count is zero, and the count will not reach zero on its own — some caller is always forgotten. If your agents log tool names, this is a query, not a project.
Stage 3: remove, on a date you announced
Publish the removal date when you publish the deprecation. Removing a tool silently is worse than never deprecating it: the caller's agent starts hallucinating arguments for a tool that no longer exists, and the failure looks like a model problem rather than a contract change.
Versioning the whole toolset
Per-tool versioning works for small changes. If you make a coordinated change across several tools — renaming a shared identifier, changing an auth model — version the whole set instead.
The simplest form is a header: X-Tool-Version: 2026-11. Date-based versions avoid the endless debate about what constitutes a major version, and they map directly onto the deprecation announcement. Stripe has run this model for over a decade and it remains the least surprising thing you can do to a caller.
With a header, the server holds multiple definitions and selects the matching one per request. Old versions keep working; new integrations get the current one by default.
What MCP changes
If your tools are exposed over the Model Context Protocol, version negotiation happens at connection time rather than per call. The client declares a protocol version and the server responds with what it supports. That handles the transport, not your tool schemas.
Tool definitions inside MCP still change exactly as described above, and an MCP server that silently redefines a tool's semantics will break every connected client the same way an HTTP endpoint would. Protocol versioning is not tool versioning.
Testing the contract
Snapshot the tool schema. Store the JSON schema of every tool in version control. A diff in that file is a contract change and should require review, exactly like a database migration.
Replay recorded calls. If you log tool invocations with their arguments, replay the last N thousand against the new definition and assert that the parsed arguments still satisfy the schema and produce equivalent results. This catches semantic drift, which no type checker will.
Assert on descriptions too. A model chooses a tool based on its description. Changing the wording changes behaviour even when the schema is identical, and nobody tests that.
The checklist
- Adding an optional parameter with a default is safe — just do it.
- Changing semantics requires a new name, no exceptions.
- Breaking changes get a
_v2that runs alongside_v1. - The deprecated tool's description starts with the word DEPRECATED.
- Instrument the old path; retire it only when its call count is zero.
- Announce the removal date at deprecation time, not later.
- Snapshot tool schemas in version control and review the diffs.
Seven items, and item two prevents most of the incidents the other six exist to handle.
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.