Skip to main content
Glama

Code MCP Server

by block

find_and_replace

Search and replace text or regex patterns across multiple files using a preview option. Modify content in specified files or file patterns, with options for case sensitivity, whole words, and backups.

Instructions

Find and replace text across multiple files with preview option

Input Schema

NameRequiredDescriptionDefault
backupNoCreate backup files before changes
caseSensitiveNoCase sensitive search (default: true)
filePatternNoFile pattern to match (e.g., "**/*.ts")
filesNoSpecific files to process
previewNoPreview changes without applying them
regexNoTreat search pattern as regex
replacementYesReplacement text
searchPatternYesText or regex pattern to search for
wholeWordNoMatch whole words only

Input Schema (JSON Schema)

{ "properties": { "backup": { "description": "Create backup files before changes", "type": "boolean" }, "caseSensitive": { "description": "Case sensitive search (default: true)", "type": "boolean" }, "filePattern": { "description": "File pattern to match (e.g., \"**/*.ts\")", "type": "string" }, "files": { "description": "Specific files to process", "items": { "type": "string" }, "type": "array" }, "preview": { "description": "Preview changes without applying them", "type": "boolean" }, "regex": { "description": "Treat search pattern as regex", "type": "boolean" }, "replacement": { "description": "Replacement text", "type": "string" }, "searchPattern": { "description": "Text or regex pattern to search for", "type": "string" }, "wholeWord": { "description": "Match whole words only", "type": "boolean" } }, "required": [ "searchPattern", "replacement" ], "type": "object" }

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/block/vscode-mcp'

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