Skip to main content
Glama

Restore a Docmost page

restore_page
Destructive

Restore a trashed Docmost page and its subpages to their original location, or revert the page to a saved revision while keeping formatting and mentions.

Instructions

Restores a page and its subpages from the trash to where they were, or to the space root when the old parent is still in the trash, or with historyId puts that saved revision back as the page's body and title, keeping diagrams, mentions and formatting.

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": {
      "pageId": "<pageId>"
    },
    "name": "restore_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYesPage id, slug id, or the full page URL copied from the browser.
historyIdNoRevision id from list_page_history to put back; refused while an open editor holds unsaved typing.
expectedUpdatedAtNoupdatedAt from your last get_page; a revision restore is refused if the page changed since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / expectedUpdatedAt
      Added value: +{
      +  "description": "updatedAt from your last get_page; a revision restore is refused if the page changed since.",
      +  "type": "string"
      +}
    • addedInput schema / properties / historyId
      Added value: +{
      +  "description": "Revision id from list_page_history to put back; refused while an open editor holds unsaved typing.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Addedv0.7.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this a non-idempotent, destructive, open-world write, so the bar is lower; the description still adds real behavior beyond them: subpages are restored recursively, the restore target falls back to the space root when the parent is still trashed, and a revision restore replaces the page body and title while preserving diagrams, mentions, and formatting. It does not repeat the refusal conditions (open editor, stale expectedUpdatedAt), but those are carried by the schema.

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?

One front-loaded sentence with the core action first and the mode variants trailing; no filler. The triple 'or ... or ...' construction is dense and slightly harder to parse than a short bulleted breakdown would be, but no words are wasted.

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?

No output schema exists, yet the description covers the operation's side effects (recursive subpage restore, relocation fallback, body/title replacement) that an agent most needs before invoking a destructive tool. Combined with the fully documented three-parameter schema and the destructive/idempotency annotations, nothing material is missing.

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 description coverage is 100%, so baseline is 3, but the description adds genuine meaning beyond the schema for historyId — that it installs the saved revision as the page's body and title, preserving formatting. It says less about expectedUpdatedAt's conflict semantics, leaving that to the schema.

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 (restores a page and its subpages from the trash) and disambiguates the two distinct operating modes: plain restore versus revision restore via historyId. An agent can tell this apart from delete_page, update_page, or replace_page_text without opening the sibling schemas.

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?

The branching language ('or to the space root when the old parent is still in the trash', 'or with historyId') tells the agent which mode applies in which situation, which is useful implied guidance. However, it never says when to prefer this tool over siblings such as update_page, replace_page_text, or list_page_history, and gives no preconditions in the description itself.

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