Skip to main content
Glama

undo_apply

Apply a recorded undo to reverse a previous operation. Use dry_run to preview the inverse tool call before executing.

Instructions

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

The inverse runs through its own governed tool, so its risk tier and audit
row are recorded 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

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
undo_idYes
Behavior4/5

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

With no annotations, the description covers key behaviors: it's a write operation (risk medium), invokes an inverse tool that logs its own risk/audit, provides a dry-run mode, and enforces single-use tokens. This is sufficient for safe invocation.

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?

The description is concise (8 lines) and well-structured: a header with risk level, a sentence on behavior, and a bulleted Args list. Every sentence is informative with no redundancy.

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?

Given 3 parameters, no output schema, and no annotations, the description fully explains the tool's purpose, parameters, and constraints (single-use, dry-run). It provides all necessary information for an AI agent to select and invoke it correctly.

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%, but the description includes an 'Args' section explaining each parameter's purpose and source (e.g., undo_id from undo_list, target passed through). This adds critical context beyond the schema's titles and defaults.

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?

The description clearly states the verb 'Apply' and the resource 'recorded undo', with a specific mechanism 'dispatch its inverse tool'. It distinguishes from sibling tools like 'undo_list' by focusing on execution rather than listing.

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?

The description explains when to use (to apply an undo) and provides usage hints like 'dry_run=True' and 'token can only be applied once'. It does not explicitly state when not to use or compare to alternatives, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/Postgres-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server