Skip to main content
Glama

Undo Anki's current undoable action

undo-collection-action
Destructive

Preview or explicitly confirm one native Anki Undo, then review the active profile before applying it. Use it only for manual actions, not automatic rollback of MCP changes.

Instructions

Preview or explicitly confirm a single native Undo. AnkiConnect cannot preview or select the undo entry; Undo can revert a manual action, not necessarily a change made through MCP. Never use it as automatic rollback. Requires AnkiConnect v1.

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-collection-action"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoReview the active profile and proposal without running the operation.
confirmNoSet true only after the user approves the reviewed collection operation.
confirmationTokenNoShort-lived, one-use token returned by this tool's preview.

Output Schema

NameRequiredDescriptionDefault
stateYes
methodYes
profileYes
warningsYes
operationIdYes
includeMediaYesRequested media option for sync; null for other operations.
expiresInSecondsYes
confirmationTokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the destructive, non-repeatable nature is established structurally. The description still adds real value beyond that: the inability to preview or select the undo entry, the mismatch between native undo and MCP-originated changes, and the AnkiConnect v1 prerequisite. It does not describe what state is left behind after an undo or whether it can be re-done.

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?

Four short sentences, all load-bearing, with the primary action stated first and the caveats ordered by risk. The telegraphic styling of 'AnkiConnect cannot preview or select the undo entry' is slightly terse but costs no clarity overall.

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 an output schema present and full schema description coverage, the description only needs to carry the risk model and prerequisites, which it does thoroughly. An agent can decide whether to call it, in what order, and under what constraints without consulting anything else.

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 'Preview or explicitly confirm' adds workflow meaning to the dryRun/confirm pair that the schema alone states only as boolean defaults. The confirmationToken parameter and its short-lived, one-use nature are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Preview or explicitly confirm a single native Undo.' The word 'native' plus 'Undo can revert a manual action, not necessarily a change made through MCP' clearly scopes it away from generic rollback tools in the sibling set. It never names a specific sibling alternative, which keeps it from a 5.

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 explicit when-not guidance: 'Never use it as automatic rollback,' and warns that AnkiConnect cannot preview or select the undo entry, so an agent knows the preview is not a diff of what will be reverted. The preview-then-confirm framing in the first sentence sets the intended two-step usage pattern.

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