Skip to main content
Glama

restore_vault

Restore a node to its state right after a commit to repair write damage or bring back a deleted node, recording the restore 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"). Returns {restored, uid, path, from_commit, was_deleted, commit}.

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 supplied, 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 is itself undoable, that it may drop post-damage changes, and that no user confirmation is required. It even lists the return payload fields, which no output schema provides.

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 clearly numbered caution list and a special-case paragraph; every section is scannable and purposeful. It is longer than most definitions but the length is justified by the safety instructions, with only slight redundancy between the numbered items and the closing return description.

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 mutation with no annotations and no output schema, the description covers the mutation's safety profile, the consent policy, prerequisites, the destructive edge case, and the return shape. Nothing an agent needs in order to call this correctly or safely 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 coverage is 0%, so the description must compensate, and it largely does: it explains that 'path' may be the node's UID when restoring a deletion, and that 'commit' takes a commit hash with a '~1' suffix to indicate the deleting commit, with a concrete example. Minor gap: it never clarifies what 'commit' means in the ordinary non-deletion case (e.g., whether it accepts HEAD or only full hashes).

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 immediately names the two motivating cases: repairing a damaged node and resurrecting a deleted one. An agent can distinguish this from sibling mutations like write_vault, patch_vault, and undo_last_vault_change from the text alone.

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?

Explicitly gives when-to-use (repair damage, restore deletion) and when-to-stop, including a numbered prerequisite flow (read_vault with commit first) and a named alternative (read_vault + patch_vault) for the case where newer changes must be preserved. It also states the user-consent boundary, which is exactly the routing information an agent needs.

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