call_graph
Generates a Mermaid flowchart of call relationships in a Python file or package. Optionally roots the graph at a specific function, adjusts direction, and includes external calls.
Instructions
Emit a Mermaid flowchart of the call relationships in a file or package.
Args: path: Path to a .py file. function: Optional root; only calls reachable from it are drawn. direction: Mermaid layout direction: TD, TB, LR, RL or BT. include_external: Include calls to names not defined in scope. scope: "file" (default) or "package" to walk every .py file in the containing directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| scope | No | file | |
| function | No | ||
| direction | No | TD | |
| include_external | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |