()
| 157 | } |
| 158 | |
| 159 | private async listAllTools(): Promise<ListedTool[]> { |
| 160 | const tools: ListedTool[] = []; |
| 161 | let cursor: string | undefined; |
| 162 | |
| 163 | do { |
| 164 | const page: ListToolsResult = await this.client.listTools(cursor ? { cursor } : undefined); |
| 165 | tools.push(...page.tools); |
| 166 | cursor = page.nextCursor; |
| 167 | } while (cursor); |
| 168 | |
| 169 | return tools; |
| 170 | } |
| 171 | |
| 172 | private async callMappedTool(kind: ToolKind, args: Record<string, unknown>): Promise<ToolCallResult> { |
| 173 | const mapping = await this.getToolMapping(); |
no test coverage detected