Skip to main content
Glama

Lilia Editor

Restore a saved version

restore_version
Destructive

Put a document back to one of its saved versions, as History's Restore does: its blocks, bibliography and page setup become the version's. The version id comes from list_versions, or is the undo.versionId an edit's reply gave (restoring it undoes every change made since). The document as it is now is saved first and the reply gives that version's id: restore it the same way to undo the restore. Only someone who may edit the document can restore it.

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
versionIdYesThe version id, from list_versions or an edit's undo.versionId.
documentIdYesThe document id.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior5/5

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

Annotations flag destructiveHint=true and idempotentHint=false, and the description goes well beyond them: it discloses that the current document state is auto-saved first, that the reply carries that saved version's id, and that restoring it reverses the restore. It also states the permission requirement (must be able to edit), which no annotation conveys.

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 sources of the id, the auto-save/undo safety net, and permissions — an efficient ordering with no filler. The 'as History's Restore does' analogy is mildly UI-bound but still aids recognition.

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 two-parameter destructive mutation with no output schema, the description covers side effects, recovery path, id provenance, and access requirements. An agent has enough to call it correctly and to undo it if needed.

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?

With 100% schema description coverage, both parameters are already documented, and the description's statement that versionId 'comes from list_versions, or is the undo.versionId' largely repeats the schema text. The added value is the semantic consequence of using an undo id, but parameter-level meaning is not substantially expanded beyond 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?

The description opens with a specific verb and resource, 'Put a document back to one of its saved versions,' and immediately enumerates what becomes the version's (blocks, bibliography, page setup). This is clearly distinguishable from siblings like list_versions, which merely supplies the id.

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 routes the agent to list_versions for ids and explains the special case of restoring an edit's undo.versionId (undoing everything since). What's missing is an explicit caveat about when not to restore, though the destructive scope is implied by describing the undo pathway.

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