Skip to main content
Glama

Undo an agent change

revert_change
DestructiveIdempotent

Undoes one agent change (a batchId from apply_ops or compose_diagram) made in the last 7 days. Only changes this app made can be reverted; changes people made by hand and changes by other apps cannot. Works on changes made on behalf of the person you act for; if that person is an organization owner or admin, it also works on this app’s changes made for other people. Fields someone else changed since then are kept and listed in effects.stale (changed, missing, would_cascade, …), and so is everything a later change touched, so a series of changes reverts fully only newest first. batchId is the mcp:… value a write returned (case-sensitive); an id that is not in this diagram’s change log returns not_found with details.reason "batch". reverted: false means nothing was applied, and reason says why: already_reverted (revertedBy says who undid it, with its batchId and seq), stale (later changes, your own included, keep those records: see effects.stale and hint) or nothing_to_revert. On success, summary counts what was undone; long effects lists are cut to the first 20 with a Count. Any other change returns bad_request with details.reason "not_agent_change".

Input Schema

NameRequiredDescriptionDefault
batchIdYes
diagramIdYesDiagram id (from list_diagrams or create_diagram).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructive/idempotent/non-read-only, and the description adds substantial context beyond them: fields changed by others are preserved and listed in effects.stale, later-touching changes block a full revert, effects lists truncate at 20 with a <name>Count, and the exact failure reasons (already_reverted, stale, nothing_to_revert, not_found, bad_request) are enumerated.

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?

The purpose is front-loaded in the first clause and nearly every sentence carries distinct operational information. It is a single dense block of text, though, and the long parenthetical error-reason enumeration could be tightened or split for scanability.

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?

With no output schema, the description carries the return contract itself — reverted: false plus reason, revertedBy with batchId and seq, summary counts, and effects.stale keys (changed, missing, would_cascade). Nothing an agent needs to call it or interpret the result is missing.

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 only 50% (batchId has no description), and the description fully compensates: batchId is the case-sensitive mcp:… value a write returned, and an id absent from this diagram's change log returns not_found with details.reason "batch". diagramId is covered by the schema.

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 (undoes) and a precisely scoped resource (one agent change, identified by a batchId produced by apply_ops or compose_diagram, within 7 days). It names the producing siblings explicitly, so an agent can distinguish revert from apply_ops/compose_diagram without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit about when it works and when it does not: only changes this app made, not manual edits or other apps' changes, only within 7 days, and only for the acting user unless that user is an org owner/admin. It also states the ordering constraint that a series reverts fully only newest-first, which is a real usage rule an agent must follow.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.