Content-Length: 291178 | pFad | http://github.com/coder/coder/commit/f805f3a4f5a787575f5ef2fc4d319fb46a30bb8f

77 chore(kyleosophy): sometimes the right abstraction is no abstraction · coder/coder@f805f3a · GitHub
Skip to content

Commit f805f3a

Browse files
committed
chore(kyleosophy): sometimes the right abstraction is no abstraction
1 parent e4e7ecc commit f805f3a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

mcp/tools/tools_registry.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,6 @@ Can be either "start" or "stop".`)),
186186
},
187187
}
188188

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-
197189
// ToolDeps contains all dependencies needed by tool handlers
198190
type ToolDeps struct {
199191
Client *codersdk.Client
@@ -231,9 +223,9 @@ func (r ToolRegistry) WithOnlyAllowed(allowed ...string) ToolRegistry {
231223

232224
// Register registers all tools in the registry with the given tool adder
233225
// and dependencies.
234-
func (r ToolRegistry) Register(ta ToolAdder, deps ToolDeps) {
226+
func (r ToolRegistry) Register(srv *server.MCPServer, deps ToolDeps) {
235227
for _, entry := range r {
236-
ta.AddTool(entry.Tool, entry.MakeHandler(deps))
228+
srv.AddTool(entry.Tool, entry.MakeHandler(deps))
237229
}
238230
}
239231

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/coder/coder/commit/f805f3a4f5a787575f5ef2fc4d319fb46a30bb8f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy