get_call_hierarchy
LSP-backed incoming and outgoing call hierarchy for a symbol. Complements trace_call_chain with type-safe precision.
What it does
get_call_hierarchy uses the Language Server Protocol to find all incoming callers and outgoing callees of a symbol. Unlike trace_call_chain which uses the AST-based call graph, this tool leverages LSP for type-safe precision.
How it differs from trace_call_chain
| Feature | trace_call_chain | get_call_hierarchy |
|---|---|---|
| Source | AST index | LSP server |
| Precision | Name-based | Type-resolved |
| Depth | Configurable | Single level |
| Availability | Always | Requires LSP |
Use trace_call_chain for deep traversal and Mermaid diagrams. Use get_call_hierarchy when you need type-safe precision for a single level of callers/callees.
When to use it
- When you need to know exactly what calls a function, with type-safe resolution
- When
trace_call_chainreturns ambiguous results due to name collisions - When investigating method overrides in class hierarchies
Related tools
Benchmark note
This benchmark compares CodeSift against the closest practical native workflow an agent would use for the same task.
For some tools, that baseline is a direct shell equivalent such as rg or find.
For AST-aware, graph-aware, and LSP-backed tools, the baseline is a multi-step workflow rather than a strictly identical command.
Results should be read as agent-workflow comparisons: token cost, call count, and practical context efficiency.