Skip to main content
Glama

Undo an edit

undo_edit
Destructive

Reverts a change made through this server, restoring backed-up files and deleting files it created. Refuses if files changed later unless force=true.

Instructions

Reverts one change made through this server (default: the most recent not yet undone, optionally of one module), restoring backed-up files and deleting files it created. Refuses if the files changed afterwards unless force=true.

Input Schema

NameRequiredDescriptionDefault
seqNoEdit number from edit_history (default: latest).
forceNoUndo even if files were modified after the edit (those later changes are lost).
moduleNoUndo the latest edit of this module.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds real substance beyond that: it restores backed-up files, deletes files the edit created, and refuses when files changed afterwards unless force=true. The guard and the loss-on-force condition are exactly the behavioral detail an agent needs.

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?

A single dense sentence with zero filler, front-loading the core action and default behavior before the refusal/force caveat.

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 three-parameter mutation tool with no output schema, the description covers action, default selection, side effects, and the failure/override path completely; nothing needed to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description adds cross-parameter meaning: that seq defaults to the latest not-yet-undone edit and that module narrows selection to one module. The force condition is also explained in behavioral terms.

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 (reverts) and resource (one change made through this server), with the exact scope of a single edit. It is clearly distinguishable from siblings like edit_submodule or forget_history.

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?

Explains the default selection behavior (most recent not yet undone) and the condition under which the tool refuses and requires force=true. This gives clear operating context, though it does not explicitly name sibling alternatives such as edit_history.

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