Apply a guarded unified patch
apply_patchApply a unified diff to a text file after verifying its SHA-256 checksum to ensure integrity before patching.
Instructions
Apply a unified diff to one existing text file after verifying the SHA-256 returned by read_file.
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": {
"projectId": "<projectId>",
"path": "<path>",
"patch": "<patch>",
"expectedSha256": "<expectedSha256>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| patch | Yes | ||
| projectId | Yes | ||
| expectedSha256 | Yes |