get tools working
This commit is contained in:
@@ -109,7 +109,7 @@ export class McpClient {
|
||||
return await this.client.request(
|
||||
{
|
||||
method: "tools/call",
|
||||
params: { name, ...params },
|
||||
params: { name, arguments: params },
|
||||
},
|
||||
CallToolResultSchema,
|
||||
);
|
||||
|
||||
@@ -45,11 +45,10 @@ wss.on("connection", (ws: WebSocket) => {
|
||||
command.name &&
|
||||
command.params
|
||||
) {
|
||||
const result = await mcpClient.callTool(
|
||||
command.name + "asdf",
|
||||
command.params,
|
||||
const result = await mcpClient.callTool(command.name, command.params);
|
||||
ws.send(
|
||||
JSON.stringify({ type: "toolResult", data: result.toolResult }),
|
||||
);
|
||||
ws.send(JSON.stringify({ type: "toolResult", data: result }));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error:", error);
|
||||
|
||||
Reference in New Issue
Block a user