Skip to main content
Glama

restore_document_version

Destructive

Revert a document to an earlier version or snapshot listed by read_document(view=versions). This updates current content and queues indexing; it cannot recover a trashed document.

Instructions

Restore content from a version or snapshot listed by read_document(view=versions). This changes current content and queues indexing; it does not restore a trashed document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionIdYesUUID returned by the corresponding list or read operation.
documentIdYesUUID returned by the corresponding list or read operation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
tagsNo
titleYes
contentYes
ownerIdYes
folderIdYes
metadataNo
createdAtYes
updatedAtYes
categoryIdYes
folderNameNo
visibilityYes
contentJsonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / documentId / description
      Previous value: -"UUID of the document whose content should be restored; it must be visible in the active workspace or category."New value: +"UUID returned by the corresponding list or read operation."
    • changedInput schema / properties / versionId / description
      Previous value: -"UUID of a version belonging to this document, from get_version_history. Use the version ID, not a snapshot label."New value: +"UUID returned by the corresponding list or read operation."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, but the description adds valuable behavior beyond them: the operation mutates current content and queues re-indexing, and it explicitly excludes trashed-document restoration. It stops short of stating reversibility (whether the restored state can itself be rolled back), which is the one gap for a destructive write.

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?

Two sentences, no filler, with the primary action front-loaded and the scope exclusion placed at the end where it reads as a guardrail. Every clause carries information.

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?

For a two-param destructive restore with an output schema and full annotation coverage, nothing essential is missing: the source of the version, the mutation effect, the indexing side effect, and the trashed-document exclusion are all present.

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 description coverage is 100%, so the baseline is 3. The description adds meaning by pointing to read_document(view=versions) as the origin of the versionId, which is more actionable than the generic schema text 'UUID returned by the corresponding list or read operation.'

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+resource ('Restore content from a version or snapshot') and immediately scopes it by naming the source of the version. The final clause distinguishes it from restore_trashed_document, so the agent can separate the two without opening either schema.

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?

Gives explicit when-to-use context -- restore from a version listed by read_document(view=versions) -- and an explicit exclusion ('does not restore a trashed document'). It would be a 5 if it named restore_trashed_document as the alternative for that excluded case, but the condition itself is unambiguous.

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