Add support for safe tool renaming#1563
Merged
tommaso-moro merged 16 commits intomainfrom Dec 11, 2025
Merged
Conversation
bretthowell714-source
approved these changes
Dec 10, 2025
bretthowell714-source
approved these changes
Dec 11, 2025
Contributor
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 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ub-mcp-server into tommy/safe-tool-rename-logic
Contributor
|
LGTM if we stick to removing these mappings again and not carry them with us all the time. |
tonytrg
approved these changes
Dec 11, 2025
Contributor
Author
|
@tonytrg Fully agree! DMing you about this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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"