Uh oh!
There was an error while loading. Please reload this page.
Add support for safe tool renaming - #1563
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a deprecation alias mechanism to enable safe, non-breaking tool renaming. When tools are renamed, old tool names can be mapped to their new canonical names, allowing existing configurations to continue working while issuing deprecation warnings.
Key changes:
- Added infrastructure for mapping deprecated tool names to canonical names
- Implemented alias resolution with user warnings when deprecated names are used
- Empty alias map ready for future tool renames
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/deprecated_tool_aliases.go | New file defining DeprecatedToolAliases map for maintaining backward compatibility when tools are renamed |
| pkg/toolsets/toolsets.go | Added deprecatedAliases field to ToolsetGroup, implemented AddDeprecatedToolAliases and ResolveToolAliases methods |
| pkg/toolsets/toolsets_test.go | Comprehensive test coverage for alias functionality including mockTool helper and tests for adding, resolving aliases, and registering specific tools |
| pkg/github/tools.go | Integration point where aliases are added to the default toolset group |
| internal/ghmcp/server.go | Resolves tool aliases after cleaning tool names and before registering specific tools |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ub-mcp-server into tommy/safe-tool-rename-logic
LGTM if we stick to removing these mappings again and not carry them with us all the time. |
Uh oh!
There was an error while loading. Please reload this page.
tommaso-moro
commented
Dec 11, 2025
@tonytrg Fully agree! DMing you about this |
This PR introduces logic to allow non-breaking tool renaming. It does so by introducing Deprecation Aliases, i.e. mappings that map "old"/deprecated tool names (e.g.
get_issue) to their new equivalent (e.g.issue_read) to gracefully handle cases where users have a server configuration that references old tool names.Overview of changes:
DeprecatedToolAliasesindeprecated_tool_aliases.goto have a single source of truth for tool names when renaming toolsDemo

You can see that mapping "test_1" to "get_me" enables "get_me"