MCPcopy Create free account
hub / github.com/53AI/53AIHub / AddTypedMCPTool

Function AddTypedMCPTool

api/controller/mcp_server.go:175–181  ·  view source on GitHub ↗

AddTypedMCPTool registers a typed MCP tool with the shared server.

(server *MCPServer, tool *mcp.Tool, handler mcp.ToolHandlerFor[In, Out])

Source from the content-addressed store, hash-verified

173
174// AddTypedMCPTool registers a typed MCP tool with the shared server.
175func AddTypedMCPTool[In, Out any](server *MCPServer, tool *mcp.Tool, handler mcp.ToolHandlerFor[In, Out]) {
176 if server == nil || server.server == nil {
177 logger.SysError("MCP server is not initialized")
178 return
179 }
180 mcp.AddTool(server.server, tool, handler)
181}

Callers 5

registerMCPKeyToolsFunction · 0.85
registerMCPSpaceToolsFunction · 0.85
registerMCPLibraryToolsFunction · 0.85
registerMCPFileToolsFunction · 0.85

Calls 1

AddToolMethod · 0.80

Tested by

no test coverage detected