Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
contextNoNumber of context lines to include
languageNoProgramming language (javascript, typescript, python, etc.)
outputFormatNoOutput format
pathsNoSpecific paths to search (defaults to current directory)
patternYesAST pattern to search for (e.g., 'function $NAME($$$ARGS) { $$$ }')
strictnessNoPattern matching strictness level
workingDirectoryNoOptional working directory for the operation (defaults to server working directory)

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnEntrypoint/mcp-repl'

If you have feedback or need assistance with the MCP directory API, please join our Discord server