call_graph
Generate a Mermaid flowchart showing function call dependencies in TypeScript/JavaScript code, with options to scope to a file or package, start from a specific function, and include external calls.
Instructions
Generates a Mermaid flowchart showing the call graph of functions in a TypeScript/JavaScript file or directory
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": {
"path": "<path>"
},
"name": "call_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the TS/JS file | |
| scope | No | Analysis scope: 'file' or 'package' | file |
| function | No | Focus on calls reachable from this function only | |
| direction | No | Graph direction: TD (top-down) or LR (left-right) | TD |
| include_external | No | Include calls to external functions |