Skip to main content
Glama

restore_vault

Restore a vault node to its last committed version to repair write damage or bring back a deleted node, with the restore saved as a new undoable commit.

Instructions

Put a node back as it was right after commit. Use it to repair a node that a write damaged, or to bring back a deleted node.

You may call this without asking the user first: a restore is recorded as a new commit, nothing is lost, and it can itself be undone. But:

  1. Read the old version first (read_vault with commit) and check it holds the content you want back.

  2. If the node was changed after the damage, a restore also drops those newer changes. Ask the user first, or use read_vault with commit and patch_vault to put back only the missing part.

  3. Tell the user what you restored: node, commit and why.

To restore a deleted node, pass its UID and the hash of the commit that deleted it with "1" added (e.g. "a1b2c3d1"). A commit from before a rename restores the node at the path it has now. Returns {restored, uid, path, from_commit, was_deleted, commit}.

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": {
      "path": "<path>",
      "commit": "<commit>"
    },
    "name": "restore_vault"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
commitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses that a restore is recorded as a new commit, that nothing is lost, that it can itself be undone, and crucially that it silently drops any changes made after the damage point. It also describes the undelete convention ('~1' suffix) and rename behavior.

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 a numbered constraint list and a dedicated paragraph for the tricky deleted-node case. Slightly repetitive in mentioning 'read_vault with commit' twice, and the numbered list is dense, but nearly every sentence carries operational value.

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 spells out the return shape ({restored, uid, path, from_commit, was_deleted, commit}). Combined with the safety model and the undelete convention, an agent has everything needed to invoke and interpret this tool 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 0%, so the description must compensate and largely does: it explains that `commit` accepts a hash with '~1' appended to target the commit that deleted a node, and that a commit from before a rename restores at the current path. It does not explicitly say whether `path` accepts a UID, a path, or both in the normal case.

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 ('Put a node back as it was right after `commit`') and clarifies the two scenarios it covers: repairing a damaged node or reviving a deleted one. It implicitly distinguishes itself from patch_vault by naming partial patching as the alternative for surgical fixes.

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 guidance, a permission statement ('you may call this without asking the user first'), and a when-not/reduced-scope alternative: if newer changes exist, ask the user or use read_vault with commit plus patch_vault. It also names the required precondition (read the old version first) and a post-call obligation.

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