Skip to main content
Glama

restore

Destructive

Revert a note to a past Git revision by vault, path, and rev; recreates deleted notes and snapshots dirty worktree state first. Rejects stale content when expected_sha256 is supplied.

Instructions

Restore a note's content from a past revision (git rev, e.g. a history sha); the response echoes the revision as restored_from. Snapshots dirty worktree state first; recreates deleted notes. Honors expected_sha256 against current content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
revYesGit revision (e.g. a history sha)
pathYesVault-root-relative note path
vaultYesVault name
expected_sha256NoSHA-256 of current content; rejects stale restores

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive and non-idempotent, but the description adds real beyond-annotation behavior: it snapshots dirty worktree state before restoring, recreates deleted notes, enforces expected_sha256 as a stale-restore guard, and reports restored_from in the response. These are non-obvious side effects an agent must know before calling.

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-loads the core action, then packs side effects into compact clauses. Dense with semicolons but every clause earns its place; only minor trimming possible.

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 destructive, non-idempotent mutation with no output schema, the description covers the safety snapshot, the concurrency guard, deleted-note handling, and the returned restored_from field. An agent has everything needed to call it correctly.

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 rev, path, vault, and expected_sha256 are already documented. The description restates the git-rev meaning and the expected_sha256 staleness check without adding syntax or format detail beyond the schema, so 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?

States a specific verb (restore), resource (a note's content), and source (a past revision / git rev). This cleanly separates it from siblings like history (inspect) and write_note (author new content), so an agent can route to it 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear selecting conditions: it operates on a past revision, and it will recreate deleted notes and snapshot dirty worktree state. However it never names an alternative ('if you only want to view revisions, use history') or states when not to use it, so it stops short of full routing guidance.

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