Apply Patch
apply_patchApply a unified diff patch to workspace files using the system patch utility. Specify a target directory and optionally perform a dry run to validate changes before applying.
Instructions
Apply a unified diff patch to workspace files using the system patch utility.
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": {
"patch": "<patch>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | . | |
| patch | Yes | ||
| dry_run | No |