call_hierarchy
Reveal a symbol's call hierarchy: inspect incoming callers, outgoing callees, or both to understand control flow and assess the impact of code changes.
Instructions
Show the call hierarchy for a symbol: who calls it (incoming) and what it calls (outgoing). PREFER a name (uri + symbol_name) — plumb resolves the exact identifier position for you, avoiding off-by-one errors; a raw file position (uri + line + character) is the fallback and, when it lands off an identifier, is snapped to the enclosing symbol. Useful for understanding control flow and assessing the impact of changes. When the language server provides no call hierarchy for the file (e.g. zls for Zig), falls back to the topology call graph, annotated source=topology (approximate).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Absolute path, file:// URI, or workspace-relative path containing the symbol | |
| line | No | Zero-based line number of the symbol. Required when symbol_name is not provided. | |
| character | No | Zero-based character offset within the line. Required when symbol_name is not provided. | |
| direction | No | Which call direction to return: callers (incoming), callees (outgoing), or both. Defaults to both. | |
| symbol_name | No | Symbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed. |