apply_patch
Apply a patch file to your workspace, using dry-run to preview changes before applying, reverse to undo patches, strip path components, and create backup files for safety.
Instructions
Apply a patch file to the workspace
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"patchFile": "<patchFile>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patchFile | Yes | Path to patch file | |
| dryRun | No | Show what would be done without making changes | |
| reverse | No | Apply patch in reverse | |
| stripPaths | No | Number of path components to strip | |
| backup | No | Create backup files |