find_callees_recursive
Find all direct and indirect callees of a C/C++ function for dependency analysis. Traverses the call graph up to a configurable depth, including function-pointer edges.
Instructions
USE INSTEAD OF ctx_callgraph(action="callees"). Find all transitive C/C++ callees — what name calls, directly or indirectly, through the libclang call graph including function-pointer edges.
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.
Requires the reference index (fw-context index — refs on by default).
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 |