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
Input Schema
Name | Required | Description | Default |
---|---|---|---|
include_text | No | ||
max_depth | No | ||
path | Yes | ||
project | Yes |
Input Schema (JSON Schema)
{
"properties": {
"include_text": {
"default": true,
"title": "Include Text",
"type": "boolean"
},
"max_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Depth"
},
"path": {
"title": "Path",
"type": "string"
},
"project": {
"title": "Project",
"type": "string"
}
},
"required": [
"project",
"path"
],
"title": "get_astArguments",
"type": "object"
}