Skip to main content
Glama

restore_document_version

DestructiveIdempotent

Restore a prior version of a workspace document as the new current bytes. Reversible: the current bytes are snapshotted as a new version first. Requires write access to the document. Refused with code DOCUMENT_LOCKED_FOR_APPROVAL while a workflow approval is open on the document.

Input Schema

NameRequiredDescriptionDefault
documentIdYesWorkspaceDocument id.
versionNumberYesThe version number to restore (>= 1).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

With annotations already covering write, destructive, and idempotent hints, the description adds substantial behavioral context: the restore is reversible because the current bytes are snapshotted as a new version first, write access is required, and a specific error code is returned when a workflow approval is open. This goes well beyond the structured fields.

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 definition is four compact sentences, front-loaded with the action and effect, then reversibility, access requirement, and failure mode. Every sentence earns its place with no filler.

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-parameter mutation tool with no output schema, the description covers effect, reversibility, required permissions, and a specific failure condition. No critical information needed to invoke it correctly appears to be missing.

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 baseline is 3. The description refers to 'a prior version' but adds no syntax, range, or ID-format detail beyond what the schema already documents.

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?

The description gives a specific verb and resource: 'Restore a prior version of a workspace document as the new current bytes.' It clearly states the action and effect. However, it does not explicitly distinguish this tool from siblings like restore_page_version or list_document_versions, so it stops short of the top score.

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

Usage Guidelines3/5

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

It provides prerequisites (requires write access) and a refusal condition (DOCUMENT_LOCKED_FOR_APPROVAL during an open approval), which is useful context. But it does not say when to choose this tool over alternatives such as update_document_content or list_document_versions, leaving usage routing implicit.

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.