From c75cfcea91398a19834ec3c4251a245d777edce3 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Tue, 13 May 2025 16:12:25 -0400 Subject: [PATCH] fix: correct the ordering of the as tool name aliases for MCP servers Signed-off-by: Donnie Adams --- pkg/mcp/loader.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/mcp/loader.go b/pkg/mcp/loader.go index 86e2f8d2..b3441719 100644 --- a/pkg/mcp/loader.go +++ b/pkg/mcp/loader.go @@ -234,11 +234,12 @@ func (l *Local) sessionToTools(ctx context.Context, session *Session, toolName s } if tool.Annotations.Title != "" && !slices.Contains(strings.Fields(tool.Annotations.Title), "as") { - toolDef.Name = tool.Annotations.Title + " as " + tool.Name + toolNames = append(toolNames, tool.Name+" as "+tool.Annotations.Title) + } else { + toolNames = append(toolNames, tool.Name) } toolDefs = append(toolDefs, toolDef) - toolNames = append(toolNames, tool.Name) } main := types.Tool{