edit_file
Replaces every exact match of a target string in a file, including matching whitespace, with new text; an empty replacement deletes the matched text.
Instructions
Replace every exact occurrence of Target in a file. Target must match the file text, including whitespace.
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>",
"Target": "<Target>",
"Replacement": "<Replacement>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Path | Yes | Absolute path of the file. | |
| Target | Yes | Exact text to replace. | |
| Replacement | Yes | Text to put in place of Target. Empty deletes it. | |
| ArtifactMetadata | No | Ignored. Omit for ordinary files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |