@@ -326,14 +326,6 @@ func NewToolDoesNotExistError(name string) *ToolDoesNotExistError {
326326 return & ToolDoesNotExistError {Name : name }
327327}
328328
329- // ToolLookupResult contains the result of a tool lookup operation.
330- type ToolLookupResult struct {
331- Tool * ServerTool
332- ToolsetName string
333- RequestedName string // The name that was requested (may differ from Tool.Name if alias was used)
334- AliasUsed bool // True if the requested name was a deprecated alias
335- }
336-
337329// FindToolByName searches all toolsets (enabled or disabled) for a tool by name.
338330// It resolves deprecated aliases automatically and logs a warning when an alias is used.
339331// Returns the tool, its parent toolset name, and an error if not found.
@@ -361,32 +353,6 @@ func (tg *ToolsetGroup) FindToolByName(toolName string) (*ServerTool, string, er
361353 return nil , "" , NewToolDoesNotExistError (toolName )
362354}
363355
364- // FindToolWithAliasInfo searches all toolsets for a tool by name and returns
365- // additional metadata about whether a deprecated alias was used.
366- // Use this when you need to track/log deprecated alias usage (e.g., for telemetry).
367- func (tg * ToolsetGroup ) FindToolWithAliasInfo (toolName string ) (* ToolLookupResult , error ) {
368- requestedName := toolName
369- aliasUsed := false
370-
371- // Check if this is a deprecated alias and resolve to canonical name
372- if canonicalName , isAlias := tg .deprecatedAliases [toolName ]; isAlias {
373- toolName = canonicalName
374- aliasUsed = true
375- }
376-
377- tool , toolsetName , err := tg .FindToolByName (toolName )
378- if err != nil {
379- return nil , NewToolDoesNotExistError (requestedName )
380- }
381-
382- return & ToolLookupResult {
383- Tool : tool ,
384- ToolsetName : toolsetName ,
385- RequestedName : requestedName ,
386- AliasUsed : aliasUsed ,
387- }, nil
388- }
389-
390356// RegisterSpecificTools registers only the specified tools.
391357// Respects read-only mode (skips write tools if readOnly=true).
392358// Returns error if any tool is not found.
0 commit comments