Skip to main content
Glama

restore_document_revision

Destructive

Restores the document to the state of a past revision — replaces its title, content and language with those of that revision, exactly as a manual update_document would with that content. expectedVersion (required, as for update_document) is the version you read via get_document before this call: if it has diverged, the call fails naming the current version rather than overwriting a concurrent write. The state OVERWRITTEN by the restoration is itself kept as a new revision — restoring is never a loss, only one more round trip in the history. ⚠️ REFUSED on a kind: "html" document, which has no history: its source is authoritative and is replaced with update_document.

Input Schema

NameRequiredDescriptionDefault
documentIdYesDocument identifier, obtained via list_documents.
revisionIdYesThe revision to restore — obtained via list_document_revisions. Its title, content and language REPLACE those of the current document, identical to what they were when this revision was kept.
expectedVersionYesThe document version you believe you are restoring over (obtained via get_document). If it has diverged since, the call fails with the current version rather than overwriting a concurrent write.
expectedProjectIdNoUUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / documentId / description
      Previous value: -"Identifiant du document, obtenu via list_documents."New value: +"Document identifier, obtained via list_documents."
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / expectedVersion / description
      Previous value: -"La version du document que tu crois restaurer (obtenue via get_document). Si elle a divergé depuis, l'appel échoue avec la version actuelle plutôt que d'écraser une écriture concurrente."New value: +"The document version you believe you are restoring over (obtained via get_document). If it has diverged since, the call fails with the current version rather than overwriting a concurrent write."
    • changedInput schema / properties / revisionId / description
      Previous value: -"La révision à restaurer — obtenue via list_document_revisions. Son titre, son contenu et sa langue REMPLACENT ceux du document courant, à l’identique de ce qu’ils étaient au moment où cette révision a été conservée."New value: +"The revision to restore — obtained via list_document_revisions. Its title, content and language REPLACE those of the current document, identical to what they were when this revision was kept."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true; the description goes well beyond that by disclosing optimistic-concurrency behavior (fails naming the current version rather than overwriting a concurrent write), the non-lossy recovery guarantee (the overwritten state is kept as a new revision), and a hard refusal condition for html documents. This is exactly the kind of behavioral context annotations cannot carry.

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?

Front-loaded with the core action, then preconditions, then the refusal warning — a sensible priority order. It is dense and slightly repetitive in restating the expectedVersion contract, but nearly every clause carries distinct 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 destructive, concurrency-sensitive mutation with no output schema, the description covers the mutation scope, the concurrency contract, the recoverability of the overwritten state, and the one case where the tool must not be used. Nothing an agent needs to invoke it safely is 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 documentId, revisionId, expectedVersion and expectedProjectId are already documented in the schema. The description reinforces expectedVersion's concurrency semantics and revisionId's replace semantics, but adds little that the schema does not already say, so the baseline of 3 applies.

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 names a precise verb and resource ("Restores the document to the state of a past revision") and immediately scopes what is replaced: title, content and language. It also differentiates from siblings by equating the effect to update_document and referencing get_document/list_document_revisions as the source of its inputs.

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 states the precondition explicitly (expectedVersion is the version read via get_document before this call), the failure mode if that precondition is violated, and an exclusion with a named alternative: REFUSED on a kind: "html" document, where update_document should be used instead. When-to-use, when-not-to-use and the alternative are all present.

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.