ast_query
Query a source file's abstract syntax tree using raw tree-sitter S-expressions to access AST structures beyond typed tools.
Instructions
Run a raw tree-sitter S-expression query against one file.
The escape hatch for anything the five typed tools flatten away.
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": {
"path": "<path>",
"query": "<query>"
},
"name": "ast_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| query | Yes | ||
| captures | No | ||
| max_tokens | No |