Skip to main content
Glama

Undo last change

undo_last_change
Destructive

DESTRUCTIVE: undo the player's newest change to the collection, whoever made it (the web app, you, another assistant, a key), within the last 24 hours; call again to step further back. Without confirm:true this is a dry run: it says what would be undone (change), who made it (made_by; yours is false when it was not you: tell the player), and removes_copies, the copies the undo takes out of the collection (an import's cards): say the count. Then repeat with confirm:true and the dry run's op_id and copies, once the player agrees. A swap is never undone (propose a new one), and an undo is refused when the cards changed since or a deck was deleted: relay the refusal, which says what to do instead.

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_last_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
op_idNoThe dry run's op_id: refused if a newer change came since
copiesNoThe dry run's copies: refused if that change grew since (an import resumed)
confirmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the destructiveHint annotation it discloses the real behavior: the default is a non-destructive dry run, the 24-hour window, the refusal conditions, and the side effect that copies from an import are removed from the collection. This is well above what the annotations alone convey, though the dry-run output fields double as return-value documentation rather than pure behavioral disclosure.

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

Conciseness3/5

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

Front-loading 'DESTRUCTIVE' is excellent, but the body is one dense paragraph that packs dry-run mechanics, output fields, refusal cases, and player messaging into a single run-on sentence chain. Every fact earns its place, yet splitting it into short steps would make the two-phase call sequence far easier to follow.

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 must explain returns and does: change, made_by, yours, and removes_copies, plus the instruction to tell the player. For a destructive, state-dependent tool with three parameters this covers everything needed to invoke it correctly and safely.

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 67% and the undocumented parameter, confirm, is exactly the one the description explains (omit it for a dry run, set true to execute). It also adds refusal semantics to op_id and copies ('refused if a newer change came since', 'refused if that change grew since') that go beyond the schema text.

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 (the player's newest change to the collection), and scopes it precisely: whoever made it, within the last 24 hours, with repeated calls stepping further back. An agent can immediately tell what this does and that it is not a generic mutation tool.

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 two-phase workflow (dry run first, then repeat with confirm:true plus the dry run's op_id and copies once the player agrees) and names the exclusions: swaps are never undone and undos are refused when cards changed since or a deck was deleted. It even specifies the fallback action (propose a new swap, relay the refusal).

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