edit_file
Replace specific content in files to modify code or text, enabling targeted edits without manual file manipulation.
Instructions
Edit a file by replacing specific content
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": {
"filepath": "<filepath>",
"old_content": "<old_content>",
"new_content": "<new_content>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | Path to the file | |
| old_content | Yes | The content to be replaced in the file. | |
| new_content | Yes | New content to insert |