Skip to main content
Glama

Undo assistant change

undo_change
Destructive

Reverses one change an AI assistant made to a bundle, a cart, an A/B test version or a section (update_section), by change_id from list_changes. Ask the merchant first: on a live bundle, cart or theme, shoppers see the result at once. Undo goes newest first for each item, and it refuses when someone changed the item since, so no one's work is lost. A change undoes this way: an update brings back the earlier content, a status change switches back, a create or copy deletes it, and a delete brings it back switched off. A version change undoes only while its test is a draft. Publishing a test's winner undoes like an update. Changes are kept 30 days.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "change_id": "<change_id>"
    },
    "name": "undo_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
change_idYesFrom list_changes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already declare destructive=false... in fact destructive, non-idempotent, open-world, but the description adds substantial context beyond them: shopper-visible effects on live surfaces, newest-first undo ordering per item, conflict refusal to prevent lost work, per-change-type undo semantics (create/copy deletes, delete restores disabled, status toggles back), and a 30-day retention window. Nothing here contradicts the destructive/non-idempotent annotations; it explains them.

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 verb, resource, and parameter source, and every subsequent sentence carries real operational information (warning, ordering, refusal, undo semantics, retention). It is dense and long for a single-parameter tool, but the length is justified by the number of distinct behaviors covered.

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 one-parameter mutation with no output schema, the definition covers the safety warning, expected failure modes, per-item undo outcomes, and data retention. An agent has everything needed to decide whether to call it and to set merchant expectations.

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

Parameters3/5

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

There is a single parameter and schema coverage is 100%, with the schema itself already saying 'From list_changes.' The description restates that same provenance without adding format, range, or validity detail. With the schema fully carrying parameter meaning, the baseline of 3 applies.

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 (reverses) and a bounded resource scope (one AI-assistant change to a bundle, cart, A/B test version, or section) plus the keying parameter. It explicitly points at list_changes as the source of change_id, so an agent can distinguish it from the listing sibling without opening either 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?

Gives an explicit precondition ('Ask the merchant first: on a live bundle, cart or theme, shoppers see the result at once') and an explicit refusal condition (someone changed the item since). It also names the case where the tool will not work — a version change is only undoable while its test is a draft — which is a genuine when-not clause.

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