Patch
patchApplies structured OpenCode/Codex file-change envelopes with add, update, move, and delete directives, validating every hunk before writing any file.
Instructions
Apply an OpenCode/Codex patch envelope with *** Begin Patch, *** Add File, *** Update File, *** Move to, and *** Delete File. All hunks are validated before any file is written.
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": {
"patchText": "<patchText>"
},
"name": "patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patchText | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |