AiDD MCP Server

edit_file

Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within the allowed directory. Always use dryRun first to preview changes before applying them.

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview changes without applying
editsYesList of edit operations
optionsNo
pathYesFile to edit

Input Schema (JSON Schema)

{ "properties": { "dryRun": { "default": false, "description": "Preview changes without applying", "type": "boolean" }, "edits": { "description": "List of edit operations", "items": { "properties": { "newText": { "description": "Text to replace with", "type": "string" }, "oldText": { "description": "Text to search for (can be substring)", "type": "string" } }, "required": [ "oldText", "newText" ], "type": "object" }, "type": "array" }, "options": { "properties": { "normalizeWhitespace": { "default": true, "description": "Normalize spaces while preserving structure", "type": "boolean" }, "partialMatch": { "default": true, "description": "Enable fuzzy matching", "type": "boolean" }, "preserveIndentation": { "default": true, "description": "Keep existing indentation", "type": "boolean" } }, "type": "object" }, "path": { "description": "File to edit", "type": "string" } }, "required": [ "path", "edits" ], "type": "object" }