Skip to main content
Glama

Undo recent changes

undo_changes
Destructive

Undo — revert, roll back, take back, or cancel the last — a recent write_events / delete_events batch, a review_day action, a manage_inbox call (capture, update, remove, schedule, park), or a manage_categories call (create, update, delete). Pass tokens: the undoToken those calls returned. Each works only while still active and before its expiresAt (a UTC instant, 30 minutes). A token reverses the whole change (delete what it created, restore what it changed or removed). If a row that the write touched changed again after the write (for example the event was moved, parked or deleted later), that token fails with stale and nothing changes. Stamp mismatches include conflictingRows with row ids and reasons (changed, deleted, newly_present), up to 50; conflictingRowsTruncated:true means more were omitted. Several tokens undo newest write first, so their order does not matter. Each result counts reverted, restored, removed and voided. To discard a whole day's reflection by date instead, use review_day with action 'discard'. Returns per-token results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokensYesThe `undoToken` from an earlier write’s successfully recorded undo receipt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / tokens / description
      Previous value: -"The `undoToken` that an earlier write returned. Every write that can be reversed returns one."New value: +"The `undoToken` from an earlier write’s successfully recorded undo receipt."
  2. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / llm_model
      Removed value: -{
      -  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "tokens",
      -  "llm_model"
      -]New value: +[
      +  "tokens"
      +]
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and readOnlyHint=false; the description goes far beyond by disclosing token expiry (30 minutes, UTC), that a token reverses the entire change atomically (delete what it created, restore what it changed/removed), the `stale` failure mode when a touched row changed again, `conflictingRows` with reasons and a 50-row truncation flag, and newest-write-first ordering across multiple tokens.

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 verb and the list of undoable operations; every sentence carries distinct information. It is dense and slightly run-on with stacked em-dashes, but nothing is redundant.

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?

No output schema exists, yet the description explains the return shape (per-token `results` counting `reverted`, `restored`, `removed`, `voided`) plus error semantics. For a destructive, single-parameter tool this is essentially complete.

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 real meaning: the token is the `undoToken` from a successful undo receipt, it works only before `expiresAt`, and multiple tokens need not be ordered. The maxItems=20 constraint is only in the schema.

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 — revert, roll back...') and enumerates exactly which prior operations it reverses: write_events/delete_events batches, review_day actions, manage_inbox calls, and manage_categories calls. An agent can distinguish it from every sibling without opening a schema.

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?

Explicitly states the precondition (pass the `undoToken` returned by those calls, only while active and before `expiresAt`) and names an alternative path: use review_day with action 'discard' to discard a whole day's reflection by date. Covers both when-to-use and when-to-use-something-else.

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.