makeTool returns a ServerTool with the given name and a no-op handler that always returns "ok".
(name string)
| 67 | // makeTool returns a ServerTool with the given name and a |
| 68 | // no-op handler that always returns "ok". |
| 69 | func makeTool(name string) mcpserver.ServerTool { |
| 70 | return mcpserver.ServerTool{ |
| 71 | Tool: mcp.NewTool(name), |
| 72 | Handler: func(_ context.Context, _ mcp.CallToolRequest) (*mcp.CallToolResult, error) { |
| 73 | return mcp.NewToolResultText("ok"), nil |
| 74 | }, |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // makeConfig builds a database.MCPServerConfig suitable for tests. |
| 79 | func makeConfig(slug, url string) database.MCPServerConfig { |
no outgoing calls
no test coverage detected