revert_edit
Restore a file to a previous state after unwanted edits using automatic backups. Reverts to the most recent backup or a specified backup ID, saving current state as a new backup.
Instructions
Restore a file to a previous state from automatic backups.
Use when edit_content made unwanted changes. Backups are created
automatically before each edit. Current state is saved as new backup
before reverting (so revert is reversible). Without backup_id, reverts to
most recent backup. Returns list of available backups with timestamps.
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": {
"absolute_file_path": "<absolute_file_path>"
},
"name": "revert_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| absolute_file_path | Yes | Absolute path to the file to revert | |
| backup_id | No | Backup ID from response. Omit to use most recent. |