From 0b9fc4c602758d52af3ea47b2e1e61dca13d85b0 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Thu, 16 Oct 2025 14:56:07 +0000 Subject: [PATCH] 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. --- src/services/mcp/McpHub.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index caca5ddb39..14e1999f38 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -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 } /**