Skip to main content
Glama

Pagetool

Restore a saved version (undo)

restore_version

Puts a site back to a version from list_versions - the undo button for AI edits. The current page is saved as a version first, so a restore can itself be undone. Free, and no account is needed for a draft you created.

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

Input Schema

NameRequiredDescriptionDefault
pageNoWhich page of the site, as its path ("/about", "/contact"). Omit for the home page. See list_pages.
site_keyNoThe site to restore. Defaults to the caller's current draft site when omitted.
version_idYesThe version to restore, from list_versions. The current page is saved as a version first, so a restore can itself be undone.
draft_tokenNoThe draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond annotations it adds genuine context: the current page is snapshotted first, making the operation self-undoable, plus that it is free and needs no account for an anonymous draft. This is consistent with destructiveHint=false and idempotentHint=false (each restore mints a new version). It stops short of saying whether pages added after the restored version disappear or whether the response reports the newly created version.

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?

Three short sentences, front-loaded with the action and the sibling it depends on, with the undo metaphor doing real explanatory work. The 'saved as a version first' clause is repeated verbatim in the schema, which is the only real waste.

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 four-parameter mutation with full schema coverage and no output schema, this covers the essentials: what it does, where the id comes from, safety, and auth/cost. The remaining gap is scope (single page vs whole site) and what a successful call leaves behind.

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 reinforces version_id's provenance (from list_versions) and that anonymous drafts require no account, but adds little beyond what the four parameter descriptions already state, including the duplicated snapshot note.

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?

"Puts a site back to a version from list_versions" names a specific verb and resource, and "the undo button for AI edits" makes the intent immediately legible. It loses a point because the framing is site-level while the schema exposes a per-page `page` parameter, leaving the actual scope of a restore slightly ambiguous.

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?

It clearly signals the use case (undoing AI edits) and names list_versions as the prerequisite source of the version id, so an agent knows the call sequence. It gives no explicit 'when not to use' — e.g. how this differs from discard_staged or archive_site — but the positive guidance is strong.

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.

Resources