Skip to main content
Glama

astgrep_replace

Transform code by matching and replacing AST patterns in specified files. Supports multiple languages, preview mode, and interactive confirmation for secure and precise modifications.

Instructions

Code transformation using ast-grep rewrite patterns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying them
interactiveNoInteractive mode for confirmation
languageNoProgramming language
pathsNoSpecific paths to transform
patternYesAST pattern to match
replacementYesReplacement pattern
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