Skip to main content
Glama

undo_changes

Destructive

Undo a whole batch (give batch = the batch id from list_changes) or selected changes (change_ids). Safe by default: a field is put back only if it still has the value that change set; anything changed afterwards is left alone and listed as skipped (reason changed_since / gone / already_undone / not_allowed). Comments the batch added are deleted (for good). The undo is itself recorded, so it can be undone again. Returns { batch, reverted: [ids], skipped: [{ id, reason }] }.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "undo_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
batchNobatch id from list_changes: undo the whole batch
change_idsNoids of single changes from list_changes, e.g. [101, 102]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / batch / description
      Added value: +"batch id from list_changes: undo the whole batch"
    • addedInput schema / properties / change_ids / description
      Added value: +"ids of single changes from list_changes, e.g. [101, 102]"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true by disclosing the safe-by-default guard (a field is reverted only if unchanged since), enumerating skip reasons (changed_since / gone / already_undone / not_allowed), and warning that comments are deleted permanently. It also notes the undo is itself recorded and thus re-undoable, which is exactly the kind of side-effect context an agent needs before a destructive call.

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?

Front-loads the two invocation modes, then safety semantics, then irreversible side effects, then return shape. Every sentence carries decision-relevant information, and the parenthetical skip-reason list is compact rather than padding.

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?

With no output schema, the description supplies the return shape ({ batch, reverted, skipped: [{id, reason}] }), covers partial-failure semantics, and warns about permanent comment deletion. Nothing material is missing for a destructive, multi-parameter mutation tool.

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 schema already documents both parameters; the description adds meaning by framing batch as 'whole batch' versus change_ids as 'selected changes' from list_changes. That clarifies the mutually exclusive intent of the two optional parameters beyond their raw type descriptions.

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 two precise targets: a whole batch or selected change_ids. It also anchors itself to the sibling list_changes as the id source, so an agent can immediately tell what this does and where its inputs come from.

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 defines the two invocation modes: pass batch to undo a whole batch, pass change_ids for selected changes, and directs the agent to list_changes for those values. The only minor gap is no stated 'when not to use', but the mode selection is fully disambiguated.

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.