Skip to main content
Glama

undo

Restore the last or a specified snapshot to revert changes and verify the restored state's hash for integrity.

Instructions

Restore the last (or specified) snapshot. Verifies hash after restore.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
snapshot_idNo
target_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add one genuinely useful behavioral fact: a hash is verified after the restore. However, it never states that the current state is overwritten by the restore, whether the operation is reversible if verification fails, or what permissions it needs — significant omissions for a mutating rollback tool.

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?

Two short sentences with zero filler, and the core capability plus the default behavior are front-loaded in the first sentence. The verification detail is relegated to a brief second sentence where it belongs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists and return values need not be described, this is a two-parameter, unannotated mutation tool with 0% schema description coverage. The description leaves the meaning of target_path, the overwrite semantics, and behavior on hash-verification failure unaddressed, which is not enough for an agent to invoke it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and largely does not. "Specified snapshot" loosely maps to snapshot_id and its optionality, but target_path — a parameter that arguably determines what is restored or where — is left entirely unexplained in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Restore the last (or specified) snapshot") and clarifies the default-vs-explicit scoping, so an agent can tell this reverts to a prior snapshot rather than performing the write operations implied by siblings like edit or patch_code. It stops short of naming any sibling or contrasting itself with rebuild, which is the nearest source of confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied: the phrase "the last (or specified)" tells the agent it can be called with no arguments to roll back to the most recent snapshot. There is no statement of when to prefer this over rebuild/edit, no preconditions, and no guidance for the case where no snapshot exists.

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