Apply patch
apply_patchValidate or apply a unified diff to a project safely: dry-run by default, confines changes to the project root, refuses mass deletions, and backs up files before writing.
Instructions
Apply a unified diff to the project. Defaults to dryRun=true. All target paths are confined to the project root, suspicious mass deletions are refused, and touched files are backed up before writing. Validates that every hunk applies cleanly first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | A unified diff to apply. | |
| dryRun | No | Validate without writing (default). Set false to actually apply. | |
| projectPath | Yes | Absolute path to the project root. | |
| createBackup | No | Back up touched files under .mcp-flow-backups/ before writing. |