apply_text_patch
Apply exact UTF-8 text replacements to files, using a SHA-256 hash to verify file integrity before applying changes.
Instructions
Apply exact UTF-8 text replacements with a required sha256 guard.
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": {
"path": "<path>",
"expected_sha256": "<expected_sha256>",
"replacements": "<replacements>"
},
"name": "apply_text_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| dry_run | No | ||
| replacements | Yes | ||
| max_diff_bytes | No | ||
| expected_sha256 | Yes |