Skip to main content
Glama
thingolus
by thingolus

editor_undo_edit

Reverts a specific MCP edit by restoring its previous property value, but only if the target and edited value still match. Skips global editor undo and saving, so changes stay scoped to that edit.

Instructions

Restore this MCP edit's previous property value only if its target and edited value still match. Does not invoke global editor Undo or save. Requires SERIOUS_EDITOR_ALLOW_MUTATION=1. On timeout, inspect editor_edit_status before retrying.

Input Schema

NameRequiredDescriptionDefault
editIdYesToken returned by editor_preview_edit; never invent one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the conditional nature of the revert (only if target and edited value still match), the env-var precondition SERIOUS_EDITOR_ALLOW_MUTATION=1, the non-invocation of global undo/save, and the timeout recovery path. That explains the mechanics behind idempotentHint=false and destructiveHint=false without contradicting them, which is exactly the added context annotations cannot carry.

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 tight sentences, front-loaded with the core action and its guard condition, followed by exclusions, precondition, and failure recovery. No sentence is redundant and each carries a distinct operational fact.

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?

For a one-parameter mutation tool with annotations and no output schema, the definition covers preconditions, scope limits, and error recovery well. What is left unstated is the post-success behavior (whether the editId is consumed or becomes invalid after restore), a minor but real gap for a non-idempotent operation.

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% and the single editId parameter is already documented as a token from editor_preview_edit that must never be invented. The description adds nothing about the parameter itself, so this sits at the baseline for full schema coverage.

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 (restore) and a precisely scoped resource (this MCP edit's previous property value), plus the guard condition that the target and edited value still match. It explicitly distinguishes itself from global editor Undo, so an agent can separate it from sibling tools like editor_apply_edit or editor_preview_edit without opening anything else.

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?

Says what it does NOT do (global Undo, save) and routes the agent to editor_edit_status on timeout before retrying, which is a concrete alternative path. The primary trigger — use after an MCP edit needs reverting — is strongly implied rather than stated, and it does not restate that editId must come from a prior preview/apply, leaving that to the schema.

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