trace_call_graph
Trace the call graph of a function by exploring callers or callees up to a specified depth, returning an indented tree of qualified names with file and line numbers.
Instructions
Trace the call graph from a function — callers or callees — to N levels, in one call (instead of chaining find_references by hand).
Returns an indented tree of qualified names with 'path:line'. Recursion and the
depth limit are marked inline. Shares the name-resolution precision tradeoff of
find_references.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "trace_call_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Function/method to start from. | |
| direction | No | 'callees' (what it calls) or 'callers' (what calls it). | callees |
| depth | No | How many levels to expand (1-4 recommended). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |