call_graph
Analyze a source file to map function call relationships, showing callers, callees, or both, with optional filtering to a specific function.
Instructions
Extract function call relationships. Shows which functions call which others. Uses tree-sitter AST when available, falls back to regex.
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": {
"file": "<file>"
},
"name": "call_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File to analyze | |
| direction | No | Direction: who calls it (callers), what it calls (callees), or both (default: both) | |
| function_name | No | Filter to calls from/to this function |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| functions | Yes |