file_patch
Edit a single exact file fragment, check it against expected SHA-256, and return the diff and derived hash; create new files with a null hash and empty old text.
Instructions
Edit a single exact fragment; new files use null expected_sha256 and empty old. Returns diff and derived hash.
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": {
"task_id": "<task_id>",
"revision": "<revision>",
"path": "<path>",
"expected_sha256": "<expected_sha256>",
"old": "<old>",
"new": "<new>",
"op_id": "<op_id>"
},
"name": "file_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | ||
| old | Yes | ||
| path | Yes | ||
| op_id | Yes | ||
| token | No | ||
| task_id | Yes | ||
| revision | Yes | ||
| expected_sha256 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |