Restore session
restore_sessionRoll a session back to a saved checkpoint to undo later cell edits and calc setting changes, then recalculate the workbook; use it to discard a what-if or bad edit.
Instructions
Roll a session back to a checkpoint from commit_session: every cell edit made after it is undone, calc settings included, and the workbook is recalculated. Use it to throw away a what-if or a bad edit; it rewinds this session only and can't reopen a closed one. Returns {restored_to, cells_changed, calc, recalc}. A commit_id the session doesn't have fails the call. To compare two states without rolling back, export each with export_workbook and use diff_workbooks.
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": {
"session_id": "<session_id>",
"commit_id": "<commit_id>"
},
"name": "restore_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commit_id | Yes | Commit ID to restore to (from commit_session) | |
| session_id | Yes | Session ID returned by create_session (list_sessions shows the open ones) |