Skip to main content
Glama
L-Jovi

Keyhole – Local files for ChatGPT

restore_change

DestructiveIdempotent

Revert a specific change in a read-write folder, but only if no later edits conflict. Restores deleted or edited files, removes created ones, and reverses moves, preserving newer changes.

Instructions

Undo one committed or interrupted change in an rw space, only if every affected path still matches that operation. Refuses to overwrite later edits. Removes created files, restores deleted/edited files, reverses moves, and removes created directories only if empty. Returns a new recovery record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
change_idYes
workspaceYes
request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2-demo.1

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare destructiveHint and idempotentHint, but the description goes well beyond them, enumerating exactly what gets removed (created files), restored (deleted/edited files), reversed (moves), and the condition that created directories are only removed if empty. It also discloses the refusal to overwrite later edits and the return of a new recovery record, adding significant behavioral context beyond the structured annotations.

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 compact and front-loaded with the primary action ('Undo one change'), followed by a clear condition and a list of behaviors. Every sentence contributes value—there is no fluff or redundancy. It is appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the tool's destructive nature and no output schema, the description covers the main behavior, preconditions, and return value ('Returns a new recovery record'). However, it omits parameter meaning, error handling, and how a caller obtains change_id or workspace. The lack of parameter guidance and brief output explanation makes it moderately complete but not thorough.

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 carries full responsibility for explaining parameters. It does not mention change_id, workspace, or request_id at all. While 'change' hints at change_id and 'rw space' hints at workspace, request_id is completely unexplained. The description fails to compensate for the lack of schema documentation.

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 clearly specifies the verb ('Undo') and the resource ('one committed or interrupted change in an rw space'), and differentiates from siblings like list_changes by focusing on reversion. It details the scope and behavior, so an agent can immediately understand what the tool does and how it differs from other operations.

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 when to use the tool (to undo a change) and gives a precondition (paths must still match), but it does not explicitly mention alternatives or state when not to use it. It lacks direction such as 'use list_changes to find change_id first' or 'prefer apply_text_patch for direct edits'. Usability is inferred rather than stated.

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