Skip to main content
Glama

Undo

undo
Destructive

Revert earlier calls that changed files by ID or last N calls. Files restore only if unchanged; use dry-run to preview restorations.

Instructions

Revert earlier calls that changed files, by undo id or the last N calls. A file is restored only if unchanged since. dryRun lists the history.

Input Schema

NameRequiredDescriptionDefault
idNoThe undo id from a tool result
stepsNoRevert the last N calls (not over HTTP)
dryRunNoPreview which calls would restore, changing nothing

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.10.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the tool as destructive and non-read-only. The description adds important behavioral nuance beyond that: a file is restored only if unchanged since the call, and dryRun lists history without modifying anything. It stops short of explaining conflict handling or result format, but the key safety behavior is 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?

Three short sentences, front-loaded with the core action and followed by the key conditional behavior and preview option. Every sentence carries useful information with no waste.

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?

Given a destructive mutation tool with no output schema, the description covers the essential behaviors: what gets reverted, the conditional restore rule, and dryRun preview. It leaves minor gaps such as how id and steps interact or what happens when files have changed, but is sufficient for correct invocation.

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 three parameters are already documented in the schema. The description reinforces the id-vs-steps selection and clarifies that dryRun lists history, but adds little syntax or format detail beyond the schema.

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: revert earlier calls that changed files. It clearly distinguishes the operation from sibling tools like edit, replace_text, or diff by focusing on undoing prior file-changing calls.

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?

It gives clear context for when to use the tool (reverting changed files) and mentions both selection modes: by undo id or by last N calls. It does not explicitly exclude alternatives or name sibling tools, but the usage scenario is unambiguous.

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