Skip to main content
Glama

Claude Kali MCP Commander

edit_block

Perform precise text replacements in files by specifying file path, old string, and new string. Use the expected_replacements parameter to control the number of changes. Ensure accuracy by including minimal context around the edit point.

Instructions

Apply surgical text replacements to files. BEST PRACTICE: Make multiple small, focused edits rather than one large edit. Each edit_block call should change only what needs to be changed - include just enough context to uniquely identify the text being modified. Takes file_path, old_string (text to replace), new_string (replacement text), and optional expected_replacements parameter. By default, replaces only ONE occurrence of the search text. To replace multiple occurrences, provide the expected_replacements parameter with the exact number of matches expected. UNIQUENESS REQUIREMENT: When expected_replacements=1 (default), include the minimal amount of context necessary (typically 1-3 lines) before and after the change point, with exact whitespace and indentation. When editing multiple sections, make separate edit_block calls for each distinct change rather than one large replacement. When a close but non-exact match is found, a character-level diff is shown in the format: common_prefix{-removed-}{+added+}common_suffix to help you identify what's different. IMPORTANT: Always use absolute paths (starting with '/' or drive letter like 'C:') for reliability. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.

Input Schema

NameRequiredDescriptionDefault
expected_replacementsNo
file_pathYes
new_stringYes
old_stringYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "expected_replacements": { "default": 1, "type": "number" }, "file_path": { "type": "string" }, "new_string": { "type": "string" }, "old_string": { "type": "string" } }, "required": [ "file_path", "old_string", "new_string" ], "type": "object" }

You must be authenticated.

Other Tools from Claude Kali MCP Commander

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/house-of-stark/Claude-Kali-MCP-Commander'

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