Replace exact text
fs_patchReplace exact literal text, not regex, in a file using old/new text pairs with required match counts, and reject files over 8 MB.
Instructions
Replace exact text, not a regular expression. Each edit has old_text, new_text, and count, and count must equal the number of matches. Files over 8 MB are rejected.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fs_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | bom | |
| path | No | path | |
| edits | No | Replacements in order. Each item is old_text, new_text, and count | |
| encoding | No | encoding | |
| expect_hash | No | expect_hash |