get_call_graph
Map transitive callers and callees for a method symbol up to a configurable depth, with cycle detection and node limit.
Instructions
Transitive caller and/or callee graph for a method symbol, depth-bounded with cycle detection. Output is an adjacency-list dict per direction (callees and/or callers), where each visited symbol maps to its outgoing edges. Direction: 'callees' (what this method transitively calls), 'callers' (who reaches this method), or 'both'. External (BCL/NuGet) callees appear as terminal leaves with isExternal=true. Declared signature only on callee side — no virtual dispatch resolution; agent uses find_implementations separately if needed. Callers side resolves dispatch naturally via Roslyn SymbolFinder. Hard cap on total visited nodes (default 500) — sets truncated=true if hit; edges to truncated targets are still recorded against the source node. Use this instead of recursive find_callers / analyze_method calls when you need depth > 1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Method symbol (e.g. 'Greeter.Greet' or 'MyNamespace.MyClass.MyMethod') | |
| maxDepth | No | Max traversal depth from root. Default 3. | |
| maxNodes | No | Hard cap on total visited nodes. Default 500. | |
| direction | No | 'callees' (default), 'callers', or 'both'. | callees |