edit_file
Replace exact text occurrences in an existing file, updating open VS Code tabs with undo support and saving changes immediately to disk.
Instructions
Edit an existing file by replacing exact occurrences of Target with Replacement. Updates open VS Code tabs cleanly with Undo support and saves immediately to disk.
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 | The absolute path of the file to modify. | |
| Target | Yes | The exact character-sequence to be replaced, including whitespace. Every occurrence is replaced. | |
| Replacement | Yes | The content to replace Target with. Leave empty to delete Target. |