Apply a unified diff patch to one project file
apply_patchApply a patch to a file after confirming its SHA256 checksum matches the expected hash.
Instructions
Preferred write tool for focused code edits. Read the file first and pass expectedSha256.
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": {
"project": "<project>",
"path": "<path>",
"patch": "<patch>",
"expectedSha256": "<expectedSha256>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| patch | Yes | ||
| project | Yes | Project key from list_projects. | |
| expectedSha256 | Yes |