Skip to main content
Glama

Undo changes

undo_changes

Reverse an agent's changes in a time window, such as after a bad import or runaway loop. Dry run by default; confirm to apply; only facts can be undone.

Instructions

Use to reverse everything one agent did in a time window, for example after a bad import or a runaway loop. By default this is a dry run that lists what would be reversed. Call again with confirm: true to write the reversals. Each reversal is a new retraction, so an undo can itself be undone. Only facts can be undone; other events are listed as skipped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actorYesThe actor whose changes to reverse, as shown by list_changes.
sinceYesStart of the window: an RFC 3339 time, or a duration back from now such as 30m, 2h or 24h.
untilNoEnd of the window, RFC 3339. Defaults to now.
reasonNoWhy the changes are being undone. Recorded on every reversal.
confirmNoSet true to write the reversals. Leave unset for a dry run.
entity_idNoOnly reverse changes to this entity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: default dry-run mode, the confirm flag as the write switch, that each reversal is itself a new retraction (so undos are undoable), and that non-fact events are listed as skipped. The reversible, non-destructive nature aligns with destructiveHint=false rather than contradicting it.

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?

Four tight sentences with zero filler, front-loaded with purpose then immediately the dry-run safety contract. Every sentence carries distinct information an agent needs.

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?

For a mutation tool with no output schema, the description explains what a dry run returns ('lists what would be reversed'), what gets skipped, and how to commit — enough for an agent to plan the two-call workflow correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters including confirm's dry-run semantics and the duration shorthand for since. The description reinforces the confirm/dry-run contract but adds no syntax or format detail the schema lacks; baseline 3 applies.

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 (reverse/undo) and scoped resource (everything one agent did in a time window), with concrete motivating examples (bad import, runaway loop). It is clearly distinguishable from sibling point-fixes like retract_fact or correct_fact by its bulk, actor-and-window scope.

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 triggering context ('after a bad import or a runaway loop') and an internal call sequence (dry run first, then confirm: true). It stops short of naming an alternative tool for narrower single-item corrections, which would have made the routing explicit.

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