Skip to main content
Glama

undo_last

Reverse the last n edits to restore exact previous state, undoing mistaken sweeps or batch changes in one call.

Instructions

Step back over your OWN last n mutations, newest first — a committed one_click, a whole detect_rooms sweep, an edit_shape, a delete_shape, an edit_materials call, or an edit_condition call. Each step is reversed exactly (a commit is removed, an edit is restored verbatim, a delete is re-inserted where it was, a materials edit's whole array is restored, a condition edit's waste/multiplier pair is restored), so this restores state rather than approximating it. Reads are never journaled, so n counts gestures that changed something, not tool calls you made. Use it when a sweep committed against the wrong condition or a batch went in on the wrong sheet — one call instead of N deletes. Scope: this session's own history only. It is not the browser canvas's undo stack, and load_plan clears it along with the shapes it refers to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoHow many steps to reverse (1–100)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
stepsYesNewest first
undoneYesSteps actually reversed
remainingYesSteps still available to undo
shape_countYesCommitted shapes after the undo
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does so exhaustively: each mutation type's exact reversal behavior is described (commit removed, edit restored verbatim, delete re-inserted, whole array restored, condition pair restored). It also clarifies scope (session's own history only), counting semantics (only state-changing gestures), and clearing behavior on load_plan. This is exceptionally transparent.

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?

The description is long but every sentence is functional. It front-loads the core purpose, then systematically details behaviors, scope, and exception cases. There is no fluff or repetition; each clause adds necessary information for correct invocation.

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?

Despite having an output schema and one well-documented parameter, the description covers all reasonable questions: what operations are undoable, how reversal works per mutation type, what counts toward n, session limitations, and interaction with load_plan. It is complete for the tool's complexity level.

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

Parameters5/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema: it clarifies that 'n' counts gestures that changed something, not tool calls, and explains the default behavior of reversing exactly. This prevents a common misunderstanding about what a 'step' is, adding real semantic value.

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?

The description opens with a specific verb+resource: 'Step back over your OWN last n mutations, newest first' and enumerates exact mutation types (one_click, detect_rooms sweep, edit_shape, delete_shape, edit_materials, edit_condition). It explicitly distinguishes itself from the browser canvas undo stack, making it clear what it does and does not apply to.

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?

It provides clear usage scenarios: 'Use it when a sweep committed against the wrong condition or a batch went in on the wrong sheet — one call instead of N deletes.' It also states when not to use: 'Reads are never journaled' and 'load_plan clears it,' implicitly telling the user that undo only works on session mutations, not arbitrary actions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kentucky-ai/opentakeoff'

If you have feedback or need assistance with the MCP directory API, please join our Discord server