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.

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": {
      "documentId": "<documentId>",
      "revisionId": "<revisionId>",
      "expectedVersion": "<expectedVersion>"
    },
    "name": "restore_document_revision"
  }
}

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 THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous 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."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. 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."
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, and the description adds nuance beyond that label: the overwritten state is itself kept as a new revision, so restoring is 'never a loss'. It also discloses the concurrency-failure mode (fails naming the current version instead of overwriting a concurrent write) and the html refusal, which the annotations do not convey.

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?

It is front-loaded with the core action and effect before the caveats, and every sentence carries operational weight. It is dense and slightly repetitive in re-describing expectedVersion semantics already present in the schema, which keeps it from a 5.

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 mutation with no output schema, it covers effect, prerequisites, failure behavior and the html exclusion. The only minor gap is what a successful call returns (e.g. the new version or revision), leaving the agent to re-read via get_document.

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 coverage is 100%, so baseline is 3, but the description adds real meaning: it explains why expectedVersion is required (optimistic concurrency guard tied to a prior get_document read) and frames revisionId as a wholesale replacement of title/content/language. It says nothing about expectedProjectId, which the schema alone covers adequately.

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 first clause gives a specific verb and resource ('Restores the document to the state of a past revision') and immediately defines the exact effect: title, content and language are replaced by the revision's values. It also anchors the operation to a familiar sibling ('exactly as a manual update_document would with that content'), so an agent can distinguish restoration from a plain update without reading 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 Guidelines5/5

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

It states the prerequisite flow explicitly: revisionId comes from list_document_revisions, expectedVersion is 'the version you read via get_document before this call'. It also names a hard exclusion with a redirect — refused on kind: "html" documents, whose source is authoritative and must be replaced with update_document — which is exactly the when-not guidance an agent needs.

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.