edit_file
Replace specific text in files by finding exact matches and substituting with new content. Use this tool to modify file contents through precise text replacement operations.
Instructions
Edit a file by replacing specific text. The old_text must match exactly (including whitespace).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file | |
| old_text | Yes | Text to find and replace (must match exactly) | |
| new_text | Yes | Text to replace it with |
Input Schema (JSON Schema)
{
"properties": {
"new_text": {
"description": "Text to replace it with",
"type": "string"
},
"old_text": {
"description": "Text to find and replace (must match exactly)",
"type": "string"
},
"path": {
"description": "Path to the file",
"type": "string"
}
},
"required": [
"path",
"old_text",
"new_text"
],
"type": "object"
}