astgrep_search
Search code patterns using AST matching across specified paths for multiple programming languages, with adjustable strictness and context lines, integrated into the MCP-REPL server.
Instructions
Pattern-based code search using ast-grep - find code patterns using AST matching
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context | No | Number of context lines to include | |
language | No | Programming language (javascript, typescript, python, etc.) | |
outputFormat | No | Output format | |
paths | No | Specific paths to search (defaults to current directory) | |
pattern | Yes | AST pattern to search for (e.g., 'function $NAME($$$ARGS) { $$$ }') | |
strictness | No | Pattern matching strictness level | |
workingDirectory | No | Optional working directory for the operation (defaults to server working directory) |