Overwrite a specific chunk in a file.
edit_file_linesReplace a specified range of lines in a file with new content, using automatic snapshot for undo capability.
Instructions
To replace a specific chunk in a file from start_line inclusive to end_line inclusive with content(one based indexing for lines), after it's snapshot has been taken.
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>",
"start_line": "<start_line>",
"end_line": "<end_line>",
"content": "<content>"
},
"name": "edit_file_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| end_line | Yes | ||
| filepath | Yes | ||
| start_line | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |