Skip to main content
Glama
basis1: Excel engine for AI agents (formulas, recalculation, audit)

basis1: Excel engine for AI agents (formulas, recalculation, audit)

Official

Restore session

restore_session
DestructiveIdempotent

Roll 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.

Input Schema

NameRequiredDescriptionDefault
commit_idYesCommit ID to restore to (from commit_session)
session_idYesSession ID returned by create_session (list_sessions shows the open ones)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / session_id / description
      Previous value: -"Session ID"New value: +"Session ID returned by create_session (list_sessions shows the open ones)"
  2. First observedv0.3.1

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations by spelling out exactly what is destroyed (every cell edit after the checkpoint, calc settings included) and the side effect of recalculating the workbook. It also discloses a failure mode ("A commit_id the session doesn't have fails the call") and the return shape, which the annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core mutation and its blast radius, then scope limits, then the return shape and the alternative path. No sentence is redundant with the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, two-parameter mutation with no output schema, everything an agent needs is present: what is destroyed, session scoping, recalculation behavior, return keys, and the error condition. Nothing material is left for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description still adds value by tying commit_id's provenance to commit_session and by stating the consequence of an unknown commit_id, giving the parameter an error contract the schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Roll a session back to a checkpoint") and immediately ties it to the producing tool (commit_session). It is clearly distinguishable from siblings like diff_workbooks or export_workbook, which are named only as alternatives rather than equivalents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when ("throw away a what-if or a bad edit") and an explicit when-not with a named alternative ("To compare two states without rolling back, export each with export_workbook and use diff_workbooks"). It also scopes the operation ("rewinds this session only and can't reopen a closed one").

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.