File tree Expand file tree Collapse file tree 3 files changed +1
-32
lines changed
Expand file tree Collapse file tree 3 files changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,6 @@ func NewMCPServer(cfg MCPServerConfig) (*mcp.Server, error) {
176176
177177 // Register specific tools if configured
178178 if len (cfg .EnabledTools ) > 0 {
179- // Clean tool names and resolve deprecated aliases
180179 enabledTools := github .CleanTools (cfg .EnabledTools )
181180 enabledTools , _ = tsg .ResolveToolAliases (enabledTools )
182181
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ func (t *Toolset) AddReadTools(tools ...ServerTool) *Toolset {
193193
194194type ToolsetGroup struct {
195195 Toolsets map [string ]* Toolset
196- deprecatedAliases map [string ]string // oldName → newName for renamed tools
196+ deprecatedAliases map [string ]string
197197 everythingOn bool
198198 readOnly bool
199199}
@@ -213,13 +213,6 @@ func (tg *ToolsetGroup) AddDeprecatedToolAliases(aliases map[string]string) {
213213 }
214214}
215215
216- // IsDeprecatedToolAlias checks if a tool name is a deprecated alias.
217- // Returns the canonical name and true if it's an alias, or empty string and false otherwise.
218- func (tg * ToolsetGroup ) IsDeprecatedToolAlias (toolName string ) (canonicalName string , isAlias bool ) {
219- canonicalName , isAlias = tg .deprecatedAliases [toolName ]
220- return canonicalName , isAlias
221- }
222-
223216func (tg * ToolsetGroup ) AddToolset (ts * Toolset ) {
224217 if tg .readOnly {
225218 ts .SetReadOnly ()
Original file line number Diff line number Diff line change @@ -302,29 +302,6 @@ func TestAddDeprecatedToolAliases(t *testing.T) {
302302 }
303303}
304304
305- func TestIsDeprecatedToolAlias (t * testing.T ) {
306- tsg := NewToolsetGroup (false )
307- tsg .AddDeprecatedToolAliases (map [string ]string {"old_tool" : "new_tool" })
308-
309- // Test with a deprecated alias
310- canonical , isAlias := tsg .IsDeprecatedToolAlias ("old_tool" )
311- if ! isAlias {
312- t .Error ("expected 'old_tool' to be recognized as an alias" )
313- }
314- if canonical != "new_tool" {
315- t .Errorf ("expected canonical name 'new_tool', got '%s'" , canonical )
316- }
317-
318- // Test with a non-alias
319- canonical , isAlias = tsg .IsDeprecatedToolAlias ("some_other_tool" )
320- if isAlias {
321- t .Error ("expected 'some_other_tool' to not be an alias" )
322- }
323- if canonical != "" {
324- t .Errorf ("expected empty canonical name, got '%s'" , canonical )
325- }
326- }
327-
328305func TestResolveToolAliases (t * testing.T ) {
329306 tsg := NewToolsetGroup (false )
330307 tsg .AddDeprecatedToolAliases (map [string ]string {
You can’t perform that action at this time.
0 commit comments