Skip to main content
Glama
AIops-tools

io.github.AIops-tools/network-aiops

undo_apply

Destructive

Apply a recorded undo by dispatching its inverse tool, with optional dry_run preview to validate parameters before execution. Each undo token can be used only once.

Instructions

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

The inverse runs through its own governed tool, so its real risk tier is recorded in that tool's audit row. 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.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the inverse runs through its own governed tool with its risk tier recorded in that tool's audit row, that dry_run previews without executing, and that a token is single-use. The single-use constraint and the governed-inverse mechanism are non-obvious behaviors an agent must know and are not captured by destructiveHint/idempotentHint.

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?

Front-loaded with the tag and core verb, then an Args block for each parameter. Every sentence carries distinct information with no filler or repetition.

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 destructive write tool with no output schema and 0% schema coverage, the definition covers the operation, safety mechanism, preview path, and all parameters. It doesn't state the success/return shape, but an agent has enough to invoke it safely and correctly.

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 description coverage is 0%, so the description must compensate, and it does: undo_id is explained with its origin, dry_run is defined as a non-executing preview, and target is described as a pass-through to the inverse tool. Target's semantics remain somewhat vague ('when it accepts a target'), keeping it short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 by dispatching its inverse tool') and distinguishes itself from the sibling undo_list by explaining that undo_id comes from undo_list or a write result. The [WRITE][risk=medium] tag reinforces the operation class. It stops short of an explicit 'unlike undo_list which only lists' contrast, so a 4 rather than a 5.

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?

Gives clear operating context: use dry_run=True to preview, the undo_id source is named, and it warns the token can only be applied once. There's no explicit when-not-to-use or named alternative for applying undos, but the intended usage is unambiguous.

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