Apply a unified diff
apply_patchApply a single-file unified diff (patch) to text and return the patched text, or applied:false if a hunk does not match. Optional fuzz 0-2.
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": {
"text": "<text>",
"patch": "<patch>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fuzz | No | ||
| text | Yes | ||
| patch | Yes | Unified diff with @@ hunks. |