redcon_structural_search
Search code by abstract syntax tree (AST) pattern to find structural matches while ignoring comments and strings, making it more precise than regex.
Instructions
Search by AST pattern (ast-grep), not regex, so matches skip comments and strings. Needs ast-grep on PATH or redcon[ast_grep]; returns backend=unavailable otherwise so callers fall back to redcon_search.
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": {
"pattern": "<pattern>"
},
"name": "redcon_structural_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | . | |
| pattern | Yes | ||
| language | No | Language hint (python, javascript, rust, ...) | |
| max_results | No |