undo_last_edit
Revert a map to its state before the most recent server edit. Restores the file from a snapshot, then prompts TrenchBroom to reload it.
Instructions
Restore the map to its state before the most recent edit made by this server (snapshot-based; one step per call). Writes the file; TrenchBroom-HL reloads it automatically, but asks first - and defaults to KEEPING the editor version - if the document has unsaved edits.
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": {
"map_path": "<map_path>"
},
"name": "undo_last_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_path | Yes | Absolute path to the .map file |