find_callees_recursive
Finds all transitive callees of a C/C++ function by traversing the call graph, including indirect calls via function pointers, for dependency analysis.
Instructions
Find all transitive C/C++ callees — what name calls, directly or indirectly, through the libclang call graph including function-pointer edges. libclang-powered: follows function-pointer calls and indirect invocations across the full dependency tree.
Use for dependency analysis: "what does this function depend on to do
its job?" Returns callees at depth 1 (direct), depth 2 (callees of
callees), up to max_depth (default 5). Results are deduplicated
by shortest distance.
For direct callees only, get_symbol_context gives a faster flat
list along with the function body and callers. For the reverse
direction use find_all_callers_recursive.
Read-only. No side effects. Requires the reference index
(fw-context index — refs on by default).
Args: name: Symbol name to find transitive callees of. project_root: Project root. Auto-detected if omitted. max_depth: Maximum BFS depth for transitive search (default 5). limit: Maximum results (default 50).
Returns:
list of dicts, each with: callee (str — callee name),
callee_qualified_name (str), depth (int — distance from source),
file (str), line (int), ref_kind ("call" or "indirect").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Symbol name to find transitive callees of. | |
| limit | No | Maximum results (default 50). | |
| max_depth | No | Maximum BFS depth for transitive search (default 5). | |
| project_root | No | Project root. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |