edit
Replace text in a file, blocking new code that duplicates existing structure to prevent redundancy.
Instructions
Edit file. Blocks if new code duplicates existing, warns on similarity.
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": {
"file_path": "<file_path>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute file path | |
| new_string | Yes | Replacement code | |
| old_string | Yes | Exact text to replace (must be unique) |