get_context
Retrieve a symbol's contextual neighborhood, including callers, callees, imports, and containers up to a specified depth, to understand code relationships without reading entire files.
Instructions
Get the contextual neighborhood around a symbol: the symbol plus connected nodes (callers, callees, imports, containers) within a given depth, and the relationships between them. The compact alternative to reading whole files for context.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The symbol name to get context for. Use either symbol_id or name, not both. | |
| depth | No | Context depth: 0=just the node, 1=direct callers/callees, 2=indirect connections, etc. Maximum depth is 5. | |
| format | No | Response format: 'json' for structured data suitable for parsing, 'markdown' for human-readable text with code blocks. | json |
| symbol_id | No | The unique ID of the symbol (returned from find_symbol). Use either symbol_id or name, not both. |