Patch
patchApply a single-file unified diff directly to a file and write the result; use dry-run to preview without modifying.
Instructions
Apply a single-file unified diff to one file and write the result. Pass { path, diff }. Use after inspecting a diff tool dry-run: pass the diff blob directly instead of re-expressing it as line edits. Rejects multi-file diffs and diffs whose hunk context does not match the file. Set dryRun=true to preview the result without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Single-file unified diff to apply (as produced by the diff tool or edit dry-run) | |
| path | Yes | File to apply the diff to | |
| dryRun | No | Preview the result without writing (default: false) |