Skip to main content
Glama

Restore Document Version

restore_document_revision
DestructiveIdempotent

Bring an earlier saved version of a document you own back as the current content. This is written as a new version, so nothing in the history is lost and the restore itself can be undone. Pass if_match to refuse if the document changed since you looked. Fails if that version is no longer kept, or if it is larger than your plan allows today.

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": {
      "slug": "<slug>",
      "revision": "<revision>"
    },
    "name": "restore_document_revision"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesThe slug of the document
if_matchNoRevision (such as "r12") from your last read. If the document has changed since, nothing is written.
revisionYesThe version to bring back, such as "r12" (see list_document_revisions).
idempotency_keyNoAny string up to 128 characters. A retry with the same key returns the original result instead of writing again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description usefully clarifies that the restore is history-preserving and can itself be undone. It also documents concrete failure conditions: unavailable revisions and plan size limits.

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?

The description is three compact sentences, front-loads the core action, then adds safety and failure context. No sentence is redundant or poorly placed.

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 four-parameter mutation tool with rich annotations and full schema coverage, the definition covers purpose, concurrency behavior, history preservation, and failure modes. The only minor omission is not mentioning idempotency_key in prose, though the schema covers it fully.

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 description coverage is 100%, so the schema already explains all four parameters. The prose reinforces if_match's purpose but does not add materially new syntax or semantics beyond the schema, making the baseline 3 appropriate.

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 states a specific verb and resource — bringing an earlier saved document version back as current content — and scopes it to documents the caller owns. This is clearly distinguishable from sibling mutations like edit_document, append_to_document, or delete_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for restoring an older revision and explains when to pass if_match for concurrency safety. It does not explicitly name alternative tools or state when not to use this one, which keeps it below 5.

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.