* Pure dispatch over the read tools — the switch, with no gate, no notices, no * allowlist/validation (the caller owns those). `codegraph_status` is handled * on the main thread in execute and never reaches here. May throw * NotIndexed/PathRefusal, which executeReadTool clas
(toolName: string, args: Record<string, unknown>)
| 1475 | * NotIndexed/PathRefusal, which {@link executeReadTool} classifies. |
| 1476 | */ |
| 1477 | private async dispatchTool(toolName: string, args: Record<string, unknown>): Promise<ToolResult> { |
| 1478 | switch (toolName) { |
| 1479 | case 'codegraph_search': return await this.handleSearch(args); |
| 1480 | case 'codegraph_callers': return await this.handleCallers(args); |
| 1481 | case 'codegraph_callees': return await this.handleCallees(args); |
| 1482 | case 'codegraph_impact': return await this.handleImpact(args); |
| 1483 | case 'codegraph_explore': return await this.handleExplore(args); |
| 1484 | case 'codegraph_node': return await this.handleNode(args); |
| 1485 | case 'codegraph_files': return await this.handleFiles(args); |
| 1486 | default: return this.errorResult(`Unknown tool: ${toolName}`); |
| 1487 | } |
| 1488 | } |
| 1489 | |
| 1490 | /** |
| 1491 | * Handle codegraph_search |
no test coverage detected