Skip to main content
Glama

restore_version

Restores an earlier file version by version ID while saving the current contents as a new version, so the change can be undone.

Instructions

Put back an earlier version of a file, using its id from versions. The current contents are kept as a version too, so this can be undone. To take back a whole change (a move, a trash), use undo instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesA path inside the vault, from its top, for example 'Taxes/2025/receipts.md'.
vaultYesThe vault's name, as listed by the vaults tool, for example 'Taxes'.
purposeYesA few words on why, shown to the user or kept in the vault's change log.
version_idYesThe id of the earlier version to put back, from versions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.4
    • addedInput schema / properties / path / description
      Added value: +"A path inside the vault, from its top, for example 'Taxes/2025/receipts.md'."
    • addedInput schema / properties / purpose / description
      Added value: +"A few words on why, shown to the user or kept in the vault's change log."
    • addedInput schema / properties / vault / description
      Added value: +"The vault's name, as listed by the vaults tool, for example 'Taxes'."
    • addedInput schema / properties / version_id / description
      Added value: +"The id of the earlier version to put back, from versions."
  2. First observedv0.1.3

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare this is a non-read-only, non-destructive, non-idempotent mutation, and the description usefully explains why it is safe: the current contents are retained as a version, so the operation can be undone. That reversibility guarantee is real context beyond the annotations. It does not cover permissions/auth or failure modes for a bad version id, so it stops short of full disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and its reversal semantics, ending with the boundary condition against undo. No sentence is filler.

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?

With an output schema present, return values need no explanation, and the description covers action, reversibility, id source, and the sibling boundary. Remaining gaps (invalid version_id behavior, vault-level permissions) are minor for a four-parameter tool.

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 all four parameters are already documented, including version_id's provenance ('from versions'). The description's mention of the id source duplicates the schema rather than adding syntax or format detail, so the baseline 3 applies.

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 states a specific verb and resource ('put back an earlier version of a file') and immediately scopes it by naming the id source and the sibling it is not (undo). An agent can distinguish it from versions and undo without opening any 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 gives an explicit routing rule: for whole changes (a move, a trash), use undo instead, and it directs the agent to the versions tool to obtain the required id. Both the when-to-use and the when-to-use-something-else conditions are stated.

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