utf8_replace
Replace text in an existing file and save as UTF-8 on Windows, avoiding Cursor's StrReplace compatibility issues.
Instructions
Replace text in an existing file and save as UTF-8. Use instead of Cursor StrReplace on Windows.
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>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "utf8_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file | |
| new_string | Yes | Replacement text | |
| old_string | Yes | Exact text to find | |
| replace_all | No | Replace all occurrences (default: false) |