Skip to main content
Glama

Undo an AI change to a WikiDrive document

wikidrive_undo_doc
DestructiveIdempotent

Revert an AI's latest change to a WikiDrive document: newly created docs go to trash for 30 days, while additions or edits roll back to the prior version with history preserved.

Instructions

Undo the latest change an AI made to one of the user's WikiDrive documents: a document an AI just created goes to the WikiDrive trash (restorable for 30 days); an AI's addition or change is reverted to the version before it, and the history keeps both. Use it when the user says 'undo' or '취소' after a document message, with the prompt_id and version that message showed; call it again with the new version to go back one more change. If the document changed in WikiDrive since, nothing is undone. Rules are undone with wikidrive_revise. Afterwards tell the user the returned message in one line, in the user's language.

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": {
      "prompt_id": "<prompt_id>",
      "version": "<version>"
    },
    "name": "wikidrive_undo_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionYesThe version the document message showed.
prompt_idYesThe document's prompt_id, as the document message showed it.
idempotency_keyNoOptional. A new random key (e.g. a UUID) for each call; reuse it only to retry the same call after an unclear result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds substantive context beyond them: created documents land in a trash restorable for 30 days, edits revert with both versions retained in history, and the version acts as an optimistic lock that makes the call a silent no-op if the document moved on. That last point is critical for an agent to interpret a non-result, and nothing in the annotations conveys it.

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?

Purpose and the two outcome branches are front-loaded, and nearly every clause carries operational information. It is delivered as one dense run-on paragraph rather than being split, which makes the retry guidance and the post-call instruction harder to scan than they need to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive three-parameter mutation with no output schema, the definition covers triggers, parameter sourcing, chaining, failure conditions, and post-call user messaging. The only gap is that it refers to 'the returned message' without indicating what that message contains or whether any other result fields come back.

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?

Schema coverage is 100%, so the baseline is 3. The description adds provenance for prompt_id and version ('that message showed') and a meaningful increment semantic for version on repeat calls, but it says nothing about idempotency_key, leaving that parameter entirely to 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?

The description opens with a specific verb and resource ('Undo the latest change an AI made to one of the user's WikiDrive documents') and immediately splits the behavior into the two cases that matter: an AI-created document goes to trash, an AI edit is reverted. It also explicitly contrasts itself with wikidrive_revise for rule changes, so an agent can distinguish it from siblings without reading any 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?

It gives an explicit trigger ('when the user says "undo" or "취소" after a document message'), states exactly which values to pass ('with the prompt_id and version that message showed'), and explains how to chain backward ('call it again with the new version'). It also names the exclusion condition ('If the document changed in WikiDrive since, nothing is undone') and routes rule-undo to wikidrive_revise.

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