treesitter_cursor_walk
Get a cursor-style view of the AST at a specific code position, showing the focus node, ancestors, siblings, and children to understand the syntax tree context.
Instructions
Return a cursor-style view (focus node + context) at a point.
Args: file_path: Path to the source code file row: Row number (0-based) column: Column number (0-based) max_depth: Maximum depth of the AST to return. output_file: If provided, writes result to this file instead of returning. Useful for large outputs to prevent context overload.
Returns: Dictionary with focus, ancestors, siblings, and children OR if output_file is set: {"status": "written", "output_file": "...", "bytes_written": N}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| row | Yes | ||
| column | Yes | ||
| file_path | Yes | ||
| max_depth | No | ||
| output_file | No |