File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
cmd/docker-mcp/internal/gateway Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -120,22 +120,18 @@ func (g *Gateway) Run(ctx context.Context) error {
120
120
server .WithToolHandlerMiddleware (toolCallbacks ),
121
121
)
122
122
123
- current := capabilities
124
- mcpServer .SetTools (current .Tools ... )
125
- mcpServer .SetPrompts (current .Prompts ... )
126
- mcpServer .AddResources (current .Resources ... )
127
- for _ , v := range current .ResourceTemplates {
123
+ mcpServer .SetTools (capabilities .Tools ... )
124
+ mcpServer .SetPrompts (capabilities .Prompts ... )
125
+ mcpServer .AddResources (capabilities .Resources ... )
126
+ for _ , v := range capabilities .ResourceTemplates {
128
127
mcpServer .AddResourceTemplate (v .ResourceTemplate , v .Handler )
129
128
}
130
129
131
130
lock .Lock ()
132
- changeListeners = append (changeListeners , func (newConfig * Capabilities ) {
133
- mcpServer .SetTools (newConfig .Tools ... )
134
- mcpServer .SetPrompts (newConfig .Prompts ... )
135
-
136
- // TODO: sync other things than tools
137
-
138
- current = newConfig
131
+ changeListeners = append (changeListeners , func (newCapabilities * Capabilities ) {
132
+ mcpServer .SetTools (newCapabilities .Tools ... )
133
+ mcpServer .SetPrompts (newCapabilities .Prompts ... )
134
+ // TODO: sync Resources and Resource Templates
139
135
})
140
136
lock .Unlock ()
141
137
You can’t perform that action at this time.
0 commit comments