nav
Navigate code symbols, trace execution paths, find callers and callees, assess impact, and explore class lineage. Start with context for comprehensive understanding.
Instructions
Code-intelligence (codegraph-compatible) navigation facade. Covers codegraph_navigate, codegraph_callers, codegraph_callees, codegraph_call_path, codegraph_xref, codegraph_impact, codegraph_context, codegraph_trace, and symbol lineage/resolve in one tool. START HERE for any 'how does X work' / trace / call-flow / understand-a-class question: call action=context FIRST (ONE call composes definition + callers + callees + code for a task), then action=callee_tree or caller_tree for the FULL traversal tree in ONE call. These replace many search/navigate/Read round-trips — do NOT loop search or per-symbol navigate; reach for the tree/context actions instead.
Pick a capability via action:
action=navigate — go-to-definition / symbol navigation (codegraph_navigate equivalent). Params: symbol (required), mode (full|references|callers|callees).
action=call_path — BFS execution path between two functions ('how does A reach B?', codegraph_call_path equivalent). Params: source_function, target_function, source_file, target_file, direction (forward|backward|bidirectional), max_depth, max_paths.
action=xref — cross-reference lookup (who uses this symbol or file, codegraph_xref equivalent). Params: symbol, mode (symbol|file), file_path.
action=resolve — go-to-definition + find-all-references for a symbol. Params: symbol (required), mode (resolve|references), output_format.
action=lineage — class/function inheritance and override lineage. Params: symbol (required), output_format.
action=impact — blast-radius / risk scoring for a function or set of functions (codegraph_impact equivalent). Risk score computed from PRODUCTION edges only; tests bucket (test_callers_count, test_callees_count) always present. Params: mode (function_impact|blast_radius|risk_score), function_name, function_names, file_path, depth, include_tests (bool, default false — when true adds test_caller_files/test_callee_files to tests bucket).
action=trace — full impact trace from a symbol outward (codegraph_trace equivalent). Params: symbol (required), output_format.
action=context — one-call focused context for a task/symbol: composes search + definition + callers + callees in a single capped response (codegraph_context equivalent). Params: task (required — natural-language description or symbol name), max_nodes, max_code_blocks, output_format.
action=callers — who calls a function (codegraph_callers equivalent). scope=point (default) → direct 1-hop callers (fast). Params: function_name/symbol (required), file_path, output_format. scope=graph → full call-graph traversal (callers mode). Params: function_name/symbol (required), file_path, depth, output_format.
action=callees — what a function calls (codegraph_callees equivalent). scope=point (default) → direct 1-hop callees (fast). Params: function_name/symbol (required), file_path, output_format. scope=graph → full call-graph traversal (callees mode). Params: function_name/symbol (required), file_path, depth, output_format.
action=callee_tree — depth-limited NESTED tree of everything a function transitively calls, in ONE call (no per-node iteration). Prefer this over looping action=callees. Params: symbol (required), file_path, max_depth (default 3, cap 10), max_nodes (default 150), output_format.
action=caller_tree — depth-limited NESTED tree of everything that transitively calls a function (blast radius), in ONE call. Params: symbol (required), file_path, max_depth, max_nodes, output_format.
action=test_map — which tests exercise a function (test-file callers, by file and test function name). Use BEFORE editing to know the test surface. Returns test_files (sorted, deduplicated), test_functions in 'file::fn' format (paste directly into pytest), edge_count (raw call edges across all resolved targets), unique_function_count (post-dedup; truncated is keyed to this), truncated flag (cap=50 unique functions). Params: symbol (required), file_path, output_format.
action=co_change — git-history temporal coupling: files that historically change together with a file or symbol (lift-ranked). Use BEFORE editing to find implicit coupling that the call graph cannot see (config+code, schema+handler, proto+generated stub). Params: symbol or file_path (one required), max_commits (default 500), min_shared (default 3), max_results (default 20), output_format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which capability to invoke. One of: call_path, callee_tree, callees, caller_tree, callers, co_change, context, impact, lineage, navigate, resolve, test_map, trace, xref | |
| scope | No | Action discriminator (e.g. point|graph). | |
| mode | No | Action sub-mode (e.g. summary|cycles). | |
| file_path | No | Target file path. | |
| symbol | No | Symbol/function name. | |
| function_name | No | Function name (alias of symbol). | |
| query | No | Search query/pattern. | |
| language | No | Language hint (usually auto). | |
| limit | No | Max results. | |
| output_format | No | Output format (toon|json). |