Restore an earlier version
restore_snapshotPuts a kept version of a project back in the editor, as an ordinary edit the user can undo. Opens the project first if another one is on screen. Like set_script it changes the screen only (save_project writes it to disk), keeps the current text as a snapshot first, and waits for a window to report showing it.
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": {
"name": "<name>",
"id": "<id>"
},
"name": "restore_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The snapshot's `id`, from `list_snapshots`. | |
| name | Yes | The project path, as `list_projects` gives it. | |
| wait_s | No | How long to wait for a window to show it, as in `set_script`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| origin | Yes | ||
| script | Yes | ||
| viewers | Yes | ||
| revision | Yes |