@@ -51,33 +51,8 @@ func RegisterServerRoutes(routerAPI huma.API, accessor contracts.MCPClientAccess
5151 },
5252 )
5353
54- huma .Register (
55- serversAPI ,
56- huma.Operation {
57- OperationID : "listTools" ,
58- Method : http .MethodGet ,
59- Path : "/{name}/tools" ,
60- Summary : "List server tools" ,
61- Tags : append (tags , "Tools" ),
62- },
63- func (ctx context.Context , input * ServerToolsRequest ) (* ToolsResponse , error ) {
64- return handleServerTools (accessor , input .Name )
65- },
66- )
67-
68- huma .Register (
69- serversAPI ,
70- huma.Operation {
71- OperationID : "callTool" ,
72- Method : http .MethodPost ,
73- Path : "/{server}/tools/{tool}" ,
74- Summary : "Call a tool for a server" ,
75- Tags : append (tags , "Tools" ),
76- },
77- func (ctx context.Context , input * ServerToolCallRequest ) (* ToolCallResponse , error ) {
78- return handleServerToolCall (accessor , input .Server , input .Tool , input .Body )
79- },
80- )
54+ // Register tool routes.
55+ RegisterToolRoutes (serversAPI , accessor )
8156
8257 // Register prompt routes.
8358 RegisterPromptRoutes (serversAPI , accessor )
0 commit comments