treesitter_get_call_graph
Generate a call graph for a source file, mapping function calls and their relationships to reveal code structure and dependencies.
Instructions
Generate a call graph showing function calls and their relationships.
Args: file_path: Path to the source code file output_file: If provided, writes result to this file instead of returning. Useful for large outputs to prevent context overload.
Returns: Dictionary containing: - nodes: List of CallGraphNode objects, each with: - name: Function name - location: Source location (start/end points) - calls: List of function names called by this function OR if output_file is set: {"status": "written", "output_file": "...", "bytes_written": N}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| output_file | No |