apply_patch
Apply a Codex patch to add, update, move, or delete files in a configured workspace. Use dry-run to validate changes without writing, and verify source files with SHA-256.
Instructions
Add, update, move, or delete files inside the configured workspace using Codex patch format. Run with "dry_run" first when the context lines are uncertain.
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 |
|---|---|---|---|
| patch | Yes | Patch beginning with *** Begin Patch and ending with *** End Patch. | |
| dry_run | No | Validate and report changes without writing files. | |
| expected_sha256 | No | When supplied, must cover every updated/deleted source path with its read-time SHA-256. |