get_symbol_neighbors
Analyze code dependencies by performing BFS graph traversal from a symbol to identify calls, imports, inheritance, and references within a codebase.
Instructions
BFS graph traversal from a symbol — who calls it, what it calls, imports, inheritance. Eliminates 20+ file reads per question.
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": {
"symbol_id": "<symbol_id>",
"snapshot_id": "<snapshot_id>"
},
"name": "get_symbol_neighbors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol_id | Yes | Symbol ID to start BFS from | |
| snapshot_id | Yes | Snapshot to query | |
| depth | No | BFS depth (default 2, max 5) | |
| edge_types | No | Comma-separated edge types to follow: call,import,inherit,implement,reference | |
| direction | No | outgoing = who this calls; both = also who calls this | outgoing |