( toolName: string, args: Record<string, unknown>, client: ConnectedMCPServer, )
| 2114 | * @returns The result of the tool call |
| 2115 | */ |
| 2116 | export async function callIdeRpc( |
| 2117 | toolName: string, |
| 2118 | args: Record<string, unknown>, |
| 2119 | client: ConnectedMCPServer, |
| 2120 | ): Promise<string | ContentBlockParam[] | undefined> { |
| 2121 | const result = await callMCPTool({ |
| 2122 | client, |
| 2123 | tool: toolName, |
| 2124 | args, |
| 2125 | signal: createAbortController().signal, |
| 2126 | }) |
| 2127 | return result.content |
| 2128 | } |
| 2129 | |
| 2130 | /** |
| 2131 | * Note: This should not be called by UI components directly, they should use the reconnectMcpServer |
no test coverage detected