fix: add type casting for CallToolResultSchema compatibility with SDK v1.20.0

The SDK v1.20.0 has a different response type structure. Added type casting
to maintain backward compatibility with the existing McpToolCallResponse type.
This commit is contained in:
Roo Code 2025-10-16 14:56:07 +00:00
parent d3f9de988d
commit 0b9fc4c602

View file

@ -1601,7 +1601,7 @@ export class McpHub {
timeout = 60 * 1000
}
return await connection.client.request(
const result = await connection.client.request(
{
method: "tools/call",
params: {
@ -1614,6 +1614,9 @@ export class McpHub {
timeout,
},
)
// Cast the result to our expected type structure for backward compatibility
return result as McpToolCallResponse
}
/**