Call-path reachability
reachabilityDetermine whether one function can transitively call another and find the shortest call chain with file:line call sites, using BFS over the caller graph.
Instructions
Call path / call chain: does FROM transitively call TO, and through which functions?
Use this instead of chaining find_callers rounds when the question is "can this function end up in that one?". BFS over the caller graph returns the SHORTEST chain, each hop with the call site's file:line. JSON results: {path_found, hops, depth, nodes_explored}; hops run from from_symbol to to_symbol. Static analysis cannot follow function pointers (ops structs, callbacks).
Args: from_symbol: The caller end ("can this reach ..."). to_symbol: The callee end ("... this function?"). max_depth: Longest chain to consider, in calls (1-12, default 8).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_symbol": "<from_symbol>",
"to_symbol": "<to_symbol>"
},
"name": "reachability"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | text | |
| max_depth | No | ||
| to_symbol | Yes | ||
| from_symbol | Yes | ||
| project_root | No |