Skip to main content
Glama

MCP Claude Code

by SDGLBL

edit

Replaces exact strings in files with precise occurrence validation, ensuring exact indentation and avoiding line number prefixes. Maintains file integrity by editing existing content only.

Instructions

Performs exact string replacements in files with strict occurrence count validation.

Usage:

  • When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.
  • ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.

Input Schema

NameRequiredDescriptionDefault
expected_replacementsNoThe expected number of replacements to perform. Defaults to 1 if not specified.
file_pathYesThe absolute path to the file to modify (must be absolute, not relative)
new_stringYesThe edited text to replace the old_string
old_stringYesThe text to replace (must match the file contents exactly, including all whitespace and indentation)

Input Schema (JSON Schema)

{ "properties": { "expected_replacements": { "default": 1, "description": "The expected number of replacements to perform. Defaults to 1 if not specified.", "title": "Expected Replacements", "type": "integer" }, "file_path": { "description": "The absolute path to the file to modify (must be absolute, not relative)", "title": "File Path", "type": "string" }, "new_string": { "description": "The edited text to replace the old_string", "title": "New String", "type": "string" }, "old_string": { "description": "The text to replace (must match the file contents exactly, including all whitespace and indentation)", "title": "Old String", "type": "string" } }, "required": [ "file_path", "old_string", "new_string" ], "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/SDGLBL/mcp-claude-code'

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