Skip to content

Commit ede5de3

Browse files
committed
Simpler code to replace tools
Signed-off-by: David Gageot <[email protected]>
1 parent 2d5a0be commit ede5de3

File tree

1 file changed

+1
-2
lines changed
  • cmd/docker-mcp/internal/gateway

1 file changed

+1
-2
lines changed

cmd/docker-mcp/internal/gateway/run.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ func (g *Gateway) Run(ctx context.Context) error {
130130

131131
lock.Lock()
132132
changeListeners = append(changeListeners, func(newConfig *Capabilities) {
133-
mcpServer.DeleteTools(current.ToolNames()...)
133+
mcpServer.SetTools(newConfig.Tools...)
134134
mcpServer.DeletePrompts(current.PromptNames()...)
135-
mcpServer.AddTools(newConfig.Tools...)
136135
mcpServer.AddPrompts(newConfig.Prompts...)
137136

138137
// TODO: sync other things than tools

0 commit comments

Comments
 (0)