File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -186,14 +186,6 @@ Can be either "start" or "stop".`)),
186
186
},
187
187
}
188
188
189
- // ToolAdder interface for adding tools to a server
190
- type ToolAdder interface {
191
- AddTool (tool mcp.Tool , handler server.ToolHandlerFunc )
192
- }
193
-
194
- // Ensure that MCPServer implements ToolAdder
195
- var _ ToolAdder = (* server .MCPServer )(nil )
196
-
197
189
// ToolDeps contains all dependencies needed by tool handlers
198
190
type ToolDeps struct {
199
191
Client * codersdk.Client
@@ -231,9 +223,9 @@ func (r ToolRegistry) WithOnlyAllowed(allowed ...string) ToolRegistry {
231
223
232
224
// Register registers all tools in the registry with the given tool adder
233
225
// and dependencies.
234
- func (r ToolRegistry ) Register (ta ToolAdder , deps ToolDeps ) {
226
+ func (r ToolRegistry ) Register (srv * server. MCPServer , deps ToolDeps ) {
235
227
for _ , entry := range r {
236
- ta .AddTool (entry .Tool , entry .MakeHandler (deps ))
228
+ srv .AddTool (entry .Tool , entry .MakeHandler (deps ))
237
229
}
238
230
}
239
231
You can’t perform that action at this time.
0 commit comments