diff --git a/graph-ui/src/provider/rpc-client.test.ts b/graph-ui/src/provider/rpc-client.test.ts index 03f1364a8..0b71cfd33 100644 --- a/graph-ui/src/provider/rpc-client.test.ts +++ b/graph-ui/src/provider/rpc-client.test.ts @@ -237,6 +237,16 @@ describe('die Werkzeuge, die erst auf Bitte JSON liefern', () => { expect(result.callers).toHaveLength(1); }); + it('spricht Richtung und Tiefe in den Woertern des trace_path-Schemas', async () => { + const { client: c, rpc } = client([{ tool: 'trace_path', json: { function: 'createUser', direction: 'inbound' } }]); + await c.tracePath(RECORDED_PROJECT, 'createUser', { direction: 'inbound', depth: 2 }); + expect(rpc.calls[0].args).toMatchObject({ function_name: 'createUser', direction: 'inbound', depth: 2 }); + expect(rpc.calls[0].args).not.toHaveProperty('max_depth'); + await c.tracePath(RECORDED_PROJECT, 'createUser'); + expect(rpc.calls[1].args).not.toHaveProperty('direction'); + expect(rpc.calls[1].args).not.toHaveProperty('depth'); + }); + it('gibt die Ablehnung wegen Mehrdeutigkeit als Antwort weiter, nicht als Fehler', async () => { const { client: c } = client([{ tool: 'trace_path', diff --git a/graph-ui/src/provider/rpc-client.ts b/graph-ui/src/provider/rpc-client.ts index c13b2b6eb..aca4ba430 100644 --- a/graph-ui/src/provider/rpc-client.ts +++ b/graph-ui/src/provider/rpc-client.ts @@ -331,17 +331,22 @@ export class RpcIntelligenceClient { * Pfade von einem Symbol aus laufen. Liefert die Vereinigung: eine * Ablehnung wegen Mehrdeutigkeit ist hier eine normale Antwort, kein * Fehler. + * + * Richtung und Tiefe in den Woertern des Servers (src/mcp/mcp.c, + * `trace_path`): `inbound`/`outbound`/`both` und `depth`. Bis zum Review + * vom 2026-10-02 gingen hier `callers`/`callees` und `max_depth` hinaus, + * und beides kennt das Schema nicht. */ async tracePath( project: string, functionName: string, - args: { direction?: 'callers' | 'callees' | 'both'; maxDepth?: number } = {}, + args: { direction?: 'inbound' | 'outbound' | 'both'; depth?: number } = {}, ): Promise { return readPathResult(await this.json('trace_path', { project, function_name: functionName, ...(args.direction ? { direction: args.direction } : {}), - ...(args.maxDepth !== undefined ? { max_depth: args.maxDepth } : {}), + ...(args.depth !== undefined ? { depth: args.depth } : {}), })); }