trace_call_chain
Trace a function's callers and callees in a local codebase to map the impact of code changes.
Instructions
Trace a function's callers and callees across a checked-out repo (AST).
Complements dependency_impact: where dependency_impact lists every reference, this builds the directed call graph — where the symbol is defined, what it calls, and what calls it — so you can reason about a change's ripple effects. Tree-sitter-based; point it at a LOCAL clone of the repo.
Args: symbol: Function or class name to trace. root: Absolute path to the local repository clone. language: Restrict to one language; auto-detects if omitted. max_depth: Levels of callers/callees to follow (default 1).
Returns: {symbol, definition{file_path, line, type}, callees[...], callers[...], stats{files_scanned, parse_errors}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | ||
| symbol | Yes | ||
| language | No | ||
| max_depth | No |