fs_replace
Replace an exact string in a UTF-8 file to make precise edits. Fails when target text is missing or ambiguous, preventing unintended changes.
Instructions
Make a precise text edit by replacing an exact string in a UTF-8 file. Fails when the target text is absent or ambiguous.
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>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "fs_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| agent | No | Optional existing runtime binding for monitor attribution; no extra handshake. | |
| newText | Yes | ||
| oldText | Yes | ||
| replaceAll | No |