redcon_structural_search
Search code by AST pattern to match real structures like class declarations, skipping comments and strings. Reduces token usage for AI coding agents.
Instructions
Search code by AST pattern (ast-grep), not regex. Patterns like class $NAME { $$$ } match real class declarations and skip text occurrences inside comments / strings. Available when ast-grep is on PATH or redcon[ast_grep] is installed; returns backend=unavailable otherwise so callers can fall back to redcon_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | . | |
| pattern | Yes | ||
| language | No | Language hint (python, javascript, rust, ...) | |
| max_results | No |