Skip to main content
Glama

restore_version

Destructive

Roll back an item to an older version: copy that version's name, slug and fields into the working draft of one locale. versionId is the version's id from list_versions of the SAME locale, not its versionNumber.

Instructions

Roll back an item to an older version: copy that version's name, slug and fields into the working draft of one locale. versionId is the version's id from list_versions of the SAME locale, not its versionNumber. It REPLACES the current draft of that locale, so unpublished edits there are lost; published versions stay in the history (a rollback can itself be rolled back), and nothing goes live until you publish_content. Returns the new draft in the get_content shape. To bring back a TRASHED item use restore_content; to simply drop unpublished edits use discard_draft. Requires the content.update permission (Admin, Editor, Author — an Author only within their own sections).

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>",
      "versionId": "<versionId>"
    },
    "name": "restore_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
localeNoLocale code. Omit for the document's own locale (its site-default variant, else its only variant).
versionIdYesThe version's `id` from list_versions (not its versionNumber).
documentIdYesThe item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / documentId / description
      Previous value: -"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."New value: +"The item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content."
  2. Changed2 schema fields changedv0.1.3
    • changedInput schema / properties / documentId / description
      Previous value: -"Content documentId"New value: +"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."
    • addedInput schema / properties / versionId / description
      Added value: +"The version's `id` from list_versions (not its versionNumber)."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds substantial context: it REPLACES the current draft so unpublished edits are lost, published versions remain in history, a rollback can itself be rolled back, and nothing goes live until publish_content. This is exactly the kind of behavioral disclosure that goes beyond structured annotations.

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?

The description is long but front-loaded with the core action and effect, then layers on routing, side effects, and permissions. Every sentence carries information, though the density is high enough that a slightly tighter grouping of side effects would help.

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?

Despite having no output schema, the description specifies the return shape ('Returns the new draft in the get_content shape'), covers side effects, alternatives, and permissions. An agent has everything needed to call this mutation correctly.

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 the baseline is 3, but the description adds genuine meaning: versionId must be the `id` from list_versions of the SAME locale, not the versionNumber. That disambiguation is valuable beyond the schema's own phrasing and prevents a common mistake.

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 and resource ('Roll back an item to an older version') and immediately clarifies the mechanism (copy name, slug and fields into the working draft of one locale). It differentiates itself from siblings by explicitly naming restore_content and discard_draft as different operations.

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?

Gives explicit when-to-use and when-not-to-use guidance: use restore_content for trashed items, use discard_draft to drop unpublished edits. It also states the permission prerequisite (content.update) and the role constraints, including the Author scoping caveat.

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