Skip to main content
Glama

MCP-REPL

by AnEntrypoint

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

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)

Input Schema (JSON Schema)

{ "properties": { "dryRun": { "description": "Preview changes without applying them", "type": "boolean" }, "interactive": { "description": "Interactive mode for confirmation", "type": "boolean" }, "language": { "description": "Programming language", "type": "string" }, "paths": { "description": "Specific paths to transform", "items": { "type": "string" }, "type": "array" }, "pattern": { "description": "AST pattern to match", "type": "string" }, "replacement": { "description": "Replacement pattern", "type": "string" }, "workingDirectory": { "description": "Optional working directory for the operation (defaults to server working directory)", "type": "string" } }, "required": [ "pattern", "replacement" ], "type": "object" }

Other Tools from MCP-REPL

Related Tools

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