get_ast
Generate an abstract syntax tree (AST) for a file, returning it as a nested dictionary. Specify project, file path, depth, and whether to include node text for detailed code analysis.
Instructions
Get abstract syntax tree for a file.
Args:
project: Project name
path: File path relative to project root
max_depth: Maximum depth of the tree (default: 5)
include_text: Whether to include node text
Returns:
AST as a nested dictionary
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": {
"project": "<project>",
"path": "<path>"
},
"name": "get_ast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_text | No | ||
| max_depth | No | ||
| path | Yes | ||
| project | Yes |