Skip to main content
Glama

undo_apply

Destructive

Apply a recorded undo by dispatching its inverse tool through the governed, audited path. Use dry_run=True to preview the inverse call before execution.

Instructions

[WRITE][risk=medium] Apply a recorded undo by dispatching its inverse tool.

The inverse runs through its own governed tool, so it is audited on the same path as any other call. Pass dry_run=True to preview the inverse call without executing it. A token can only be applied once.

Args: undo_id: The undoId from undo_list (or an _undo_id in a write result). dry_run: If True, preview the inverse tool + params without running it. target: Passed through to the inverse tool when it accepts a target.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
undo_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent and destructive, and the description adds meaningful context beyond them: the inverse runs through its own governed/audited tool, dry_run previews without executing, and 'a token can only be applied once' explains the one-shot semantics. It does not say what happens on partial failure or whether the undo is itself reversible, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the [WRITE][risk=medium] tag followed by the core mechanism in the first sentence, then the preview and one-shot constraints, then a compact Args block. Every sentence carries information; the Args section mildly duplicates the schema titles but adds origin/behavior notes.

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 3-param mutation tool with no output schema, the description covers the mutation path, auditing, preview, and idempotency-limit. Missing are error/rollback behavior and the concrete return of a dry_run preview, but the essentials for correct invocation are present.

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 0%, so the description carries the full burden and mostly does: undo_id is defined by origin, dry_run by effect, and target by pass-through behavior. The target semantics are a bit thin (which tools accept it, what values), but all three params get meaning the schema lacks.

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+resource ('Apply a recorded undo') and immediately explains the mechanism ('dispatching its inverse tool'), which distinguishes it from the sibling undo_list that produces the tokens. An agent can tell what this does without opening the schema.

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?

Points to the source of the required argument ('the undoId from undo_list (or an _undo_id in a write result)'), which implicitly routes the agent through undo_list first, and describes the dry_run preview path. It stops short of explicit when-not-to-use guidance or naming alternatives, so it is clear context rather than full routing.

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