Skip to main content
Glama

Undo the last change

undo_last_change

Use this when the user wants to take back the last change made from the chat, to one formula or the last of any, from any chat. Pass the exact changeId from a write result or this tool's preview. Without changeId this only previews the latest change and changes nothing. Reuse the SAME changeId after an error or retry: a completed undo is idempotent and never steps farther back. Only preview/select another ID when the user asks for another step (20 changes per formula,30 days). A concurrent edit aborts the whole restore; newer app work is not overwritten.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formulaNoOnly changes to this formula: its id or exact name.
changeIdNoExact undo changeId. Omit for preview only; use the same ID for retries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / changeId
      Added value: +{
      +  "description": "Exact undo changeId. Omit for preview only; use the same ID for retries.",
      +  "pattern": "^\\d{1,20}$",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior2/5

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

Adds real operational context beyond the annotations: omitting changeId is preview-only and mutates nothing, a concurrent edit aborts the whole restore, newer app work is not overwritten, and there is a 20-changes-per-formula / 30-day window. However, it explicitly claims 'a completed undo is idempotent and never steps farther back,' which directly conflicts with the declared idempotentHint=false and could lead an agent to retry more aggressively than the annotation sanctions.

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?

Front-loaded with the trigger sentence and densely packed with decision-relevant facts; every clause carries weight. It is written as a long run-on with several ideas chained by semicolons, which slightly hurts scannability but not substance.

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

Completeness4/5

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

For a 2-parameter tool with no output schema, it covers the key decision points: preview vs apply, retry/idempotency policy, retention window, and concurrency behavior. The one omission is the shape of the preview result when changeId is absent, but that gap is minor.

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, but the description adds value the schema does not: it tells the agent where changeId comes from ('from a write result or this tool's preview') and the exact behavioral consequence of omitting it. That is meaningful semantics layered on top of the field documentation.

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 (undo) and resource (last change), and pins the scope tightly: 'take back the last change made from the chat, to one formula or the last of any, from any chat.' No sibling tool performs undo, and the preview-vs-apply distinction makes the intent 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?

Leads with an explicit trigger ('Use this when the user wants to take back the last change'), then gives when-not rules ('Only preview/select another ID when the user asks for another step') and the retry condition. The agent knows exactly when to call it and when to omit changeId versus supply one.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources