Introduction¶
When DSH agents integrate with third-party MCP servers, tools or parameters can suddenly break after an upgrade. These breaking changes typically come without explicit notification: a tool gets renamed, a parameter is removed, a type shifts from number to string, an optional field becomes required, or an enum range narrows. Such changes often surface as validation errors only at the next invocation, making diagnosis costly. dsh-mcp-tool-schema-diff is designed to flag changes the moment they occur, helping developers catch and fix issues proactively.
Plugin Overview¶
dsh-mcp-tool-schema-diff is a DSH plugin categorized under “Memory.” It maintains the last three tool-set snapshots for each MCP server and performs a diff comparison against historical snapshots when a new tool registration is detected, reporting breaking changes such as removed tools, deleted parameters, or modifications to types and required fields.
Core Features¶
- Saves the last three tool-set versions for each MCP server.
- On each new tool registration, compares against the most recent snapshot to identify breaking changes.
- Reports change details including server name, tool name, parameter path, and change type.
- Provides the
/mcp-diffcommand to view the full diff card, as well as/mcp-diff resetand/mcp-diff reset <server>to clear the cache. - Persists the cache at
$DSH_HOME/mcp-schema-cache/<server>.json(falling back to~/.dsh/mcp-schema-cache/<server>.json), storing the last three versions per server in a single file.
Installation & Activation¶
Install via the DSH plugin manager:
dsh plugin add dsh-mcp-tool-schema-diff
After installation, the plugin declares its own patch (cordis.patch.yml), requiring no additional configuration. When a server’s tools first appear, the plugin automatically establishes a baseline and begins tracking subsequent changes.
Typical Usage¶
Once installed, you can use the following commands within a DSH conversation:
/mcp-diff: Forces a re-check and prints a detailed diff card. This command does not wake a running agent./mcp-diff reset: Clears the cached versions for all servers; the next check will re-establish the baseline./mcp-diff reset <server>: Clears the cached versions for a specific server, e.g.,/mcp-diff reset github.
When a breaking change is detected, a notice appears in the conversation log, for example:
MCP tool schema changed for "github": 6 breaking changes. parameters.options.sort no longer accepts "comments" (+5 more breaking). Run /mcp-diff for the full diff.
Use /mcp-diff to view a detailed card containing the server name, the number of changes, and specific change items (tool removals, parameter changes, type changes, etc.).
Use Cases & Caveats¶
- Ideal for DSH developers who frequently integrate with third-party MCP servers, especially when those servers update often and do not provide clear change notifications.
- The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation to ensure it fits your use case.
- The plugin does not provide a banner service; change notifications are presented via notices in the conversation log and the
/mcp-diffcard. - For servers with very frequent tool-set changes and rapid register/unregister event cycles, the plugin waits for registrations to stabilize before performing the comparison to avoid false positives.
- Only registered and visible tool names are grouped (based on the
mcp__<serverName>__<rawName>pattern). If a server name contains__, grouping may be incorrect. - Parameter changes deeper than 4 levels, or with more than 64 properties or enum values, will only receive a summary notice rather than an itemized report.
In Short¶
dsh-mcp-tool-schema-diff shifts MCP server tool schema change detection earlier in the workflow, helping you discover breaking changes immediately after an upgrade and reducing runtime errors. For more details, visit the plugin directory page or the GitHub repository.