Skip to main content
Glama

snapshot_restore

Restore a workspace to a specific snapshot using its SHA, requiring explicit human confirmation before executing this destructive operation.

Instructions

恢复工作区到指定快照。🔴 破坏性,必须 human_confirmed:true。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaYes目标快照 SHA(完整或 ≥4 位短前缀——用 snapshot_list 查时间线)
commentNo决策备注(写入 decision-log)
project_dirNo项目根目录(可选——默认当前工作目录)
human_confirmedNo🔴 人工确认:false/缺省=挂起等人审(默认);true=执行恢复。破坏性操作不允许自动执行

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly warns '🔴 破坏性' (destructive) and requires 'human_confirmed:true', which is essential for a mutating tool. It does not go into further detail such as irreversibility or effects on uncommitted changes, but the core destructive nature and safety gate are clearly disclosed.

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?

The description is a single concise sentence with the critical information front-loaded: action, target, and destructive warning. Every part earns its place, with no filler or repetition of schema details.

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?

The description covers the essential context: what the tool does, that it is destructive, and that human confirmation is mandatory. The schema fully covers all parameters and even references snapshot_list for finding the target. Given the tool's moderate complexity and absent output schema, this is nearly complete, though it could mention what happens on success or whether the operation is irreversible.

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 fully documented in the input schema. The tool description itself adds no parameter-level meaning beyond the schema, so the baseline of 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: '恢复工作区到指定快照' (restore workspace to a specified snapshot), which clearly conveys the operation. It distinguishes this from the sibling snapshot_list by the action 'restore' versus list, and from other tools by the resource type. This is precise and unambiguous.

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?

The description implies the use case (restore workspace when you need to revert to a snapshot) and adds a mandatory safety requirement (human_confirmed:true), but it does not explicitly name alternatives or state when not to use it. The sibling snapshot_list is naturally related but is not mentioned as the prior lookup step, leaving some usage guidance implied rather than explicit.

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

Deploy Server

Other Tools