Skip to main content
Glama

undo_last

Roll back your last n takeoff changes—commits, room sweeps, shape, material, and condition edits—restoring prior state. Recover from a wrong sweep or bad batch in one call instead of many deletes.

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 present, the description carries full burden and excels: it discloses the journaling model ('reads are never journaled, so n counts gestures that changed something'), reveals the exactness guarantee per mutation type (restored verbatim, re-inserted, array restored, pair restored), and disclaims approximation ('restores state rather than approximating it'). For a session-internal undo, omitted details like auth or rate limits are not applicable, and there is no contradiction with structured data.

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

Conciseness4/5

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

There is no dead weight — every sentence carries semantic load, and scoping comes first. However, the opening sentence is a run-on that buries the type enumeration in a long parenthetical, and the emphatic 'your OWN' adds tone without information. A judicious trim (~30%) would make it tighter, but this is well above average.

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?

Given zero annotations and the inherent complexity of an undo-with-journaling semantics, the description covers semantics, scope, state-reset triggers (load_plan), and usage signals. The presence of an output schema removes the need to document return values, and the only genuine gap — behavior on an empty history — is a minor edge case.

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% (n: integer, 1–100, default 1), so the baseline is 3 even with no extra description. The description earns the bump by clarifying what n actually counts ('gestures that changed something, not tool calls you made') and hinting at batching via 'one call instead of N deletes.' It doesn't reach 5 because the schema already handled the mechanics.

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 clear verb+resource+scope ('Step back over your OWN last n mutations, newest first') in the very first phrase, so an agent immediately knows what it does. It explicitly differentiates itself from a likely source of confusion ('It is not the browser canvas's undo stack') and grounds every example type (one_click, detect_rooms, edit_shape...) in actual sibling tools, making the purpose unambiguous.

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?

Provides concrete trigger scenarios ('a sweep committed against the wrong condition or a batch went in on the wrong sheet') with an economics argument for choosing it ('one call instead of N deletes'). Explicitly scopes itself away from alternatives: not the browser canvas undo, session-only history, and invalidated by load_plan. This is exactly the when/when-not guidance the rubric asks for.

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