Skip to main content
Glama

undo_apply

Destructive

Apply a recorded rollback by dispatching its inverse governed tool, with dry-run preview and one-time audited 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 and labelled with its own risk tier there. 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.8.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (destructive, non-idempotent, not read-only), and the description adds value beyond them: the inverse runs through its own governed/audited tool with its own risk tier, dry_run previews it, and a token can only be applied once. The [WRITE][risk=medium] label and single-use constraint are meaningful behavioral disclosures.

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-loads the [WRITE][risk=medium] tag and the core action, then follows with useful behavioral notes and an Args section. It is slightly longer than necessary (some prose could be tightened), but every element earns its place.

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 mutation tool with no output schema, the description explains the dispatch mechanism, audit behavior, single-use constraint, and preview option. It does not spell out the concrete effect (which depends on the dynamic inverse tool), but that is inherent to this indirection pattern.

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

Parameters5/5

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

Schema coverage is 0%, so the description must carry the burden, and it does: undo_id is sourced from undo_list, dry_run previews the inverse without executing, and target is passed through only when the inverse accepts one. All three parameters are given meaning the schema does not provide.

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 and resource ('Apply a recorded undo by dispatching its inverse tool') and distinguishes itself from undo_list by sourcing the undo_id there. An agent can tell it apart from the sibling undo_list and the rollout_undo_deployment tools without opening a 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?

Clearly says how to obtain the undo_id (from undo_list or an _undo_id in a write result) and when to use dry_run=True to preview. It lacks an explicit 'when not to use' or a direct comparison to rollout_undo_deployment, but the triggering context is well established.

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