Video guide

MCP Tool Schema Versioning: A Practical Guide for Small Teams

A founder-focused framework for classifying MCP schema changes, coordinating client upgrades, handling cached contracts, and rolling back safely.

Based on the article MCP Tool Schema Versioning: A Practical Guide for Small Teams.

Transcript

Treat Schemas as Product Contracts MCP tool schemas should be versioned as product contracts, not changed whenever an implementation changes. Additive changes can usually ship in a backward-compatible release. Breaking changes need a new contract, a migration path, and a coordinated release. Cached schemas are stale copies of a contract, not harmless metadata. A rollback must restore the server implementation and the contract clients expect. The MCP protocol version and an individual tool schema are separate concerns. Protocol negotiation shows whether a client and server share a protocol revision. It does not guarantee that every tool contract remains unchanged. What Clients Actually Depend On A tool's public contract includes its name, title, description, input schema, output schema, structured content, error behavior, and whether the tool list changes during a session. Clients use this metadata to discover and select tools. A small schema change can therefore cause invalid arguments, failed calls, incorrect tool selection, or the wrong business operation. MCP currently uses JSON Schema 2020-12 as the default dialect when no schema declaration is present. A schema may declare another dialect explicitly. This standardizes interpretation, but it does not guarantee application-level compatibility. Classify Compatibility by Behavior Use one rule: a client using a previously valid tool contract must still receive a valid, semantically equivalent result. Usually additive changes include optional inputs, optional outputs, new tools, extra metadata, and relaxed validation. But optional outputs can break strict decoders. Breaking changes include renaming or removing tools, adding required inputs, changing types or constraints, narrowing enums, changing structured content, or altering units and business outcomes. A description can also change behavior. If you cannot explain how an older client behaves with the new schema, classify the change as breaking until you can. Give Contracts an Explicit Identity Tool names alone are not enough to identify versions. Renaming create_invoice to create_invoice_v2 can break discovery and leave overlapping tools in the catalog. Instead, maintain a contract registry in the server repository. Generate schema digests from the published schemas in CI. Do not maintain them manually. For every release, publish a compatibility report. It should list added or removed tools, changed input or output schemas, compatibility classifications, supported contract versions, whether the previous release can still serve the previous contract, and the rollback target. A versioned repository file generated in CI can be enough for a small team. Choose a Migration Path There are three practical schema migration options. Expand and deprecate means keeping the old tool and schema while adding fields or a new tool. This is usually best when clients are numerous or upgrades are slow. Publish a new contract under a new name when semantic changes are large. Keep the old tool during migration, announce its deprecation date, and remove it after clients migrate or the compatibility window closes. You can also break the contract in a coordinated release when you own every consumer and can invalidate caches atomically. Do not keep old and new variants indefinitely. Catalog clutter increases selection ambiguity and release complexity. Coordinate Clients, Caches, and Rollback A server release is only half the migration because clients may hold cached schemas. First, the server accepts old and new contracts. Next, clients retrieve the new contract and refresh cached data. Then selected clients move forward while the team tracks usage and validation failures by contract version. Finally, the old contract is removed later with notice. Log the server release, tool, contract version, schema digest, validation error, client version, and fallback behavior without logging sensitive arguments. On mismatch, return a structured error instead of retrying guessed values. Roll back the server artifact, schemas, descriptions, registry, and compatibility shims together. Verify tools/list after rollback. Read the original article for the full checklist and specification links.
---