Skip to main content
Glama

Undo mutations

undo
Destructive

Roll back the last N mutations by truncating and replaying the journal. Destructive to audit history; for session claims use revert.

Instructions

Roll back the last N mutations (steps, default 1) by truncating the journal and replaying it. Destructive to audit history: the undone journal records are gone for good, and success is silent. For session claims use revert instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsNonumber of mutations to revert (default 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description adds crucial behavioral details: journal truncation, permanent loss of audit records, silent success, and the replay mechanism. This provides meaningful context that annotations alone do not convey.

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 two sentences with no wasted words. The primary action is front-loaded, followed by critical destructive consequences and a clear pointer to the alternative tool.

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 single-parameter, destructive tool with annotations and sibling guidance, the description is complete. It covers what the tool does, how it operates, its destructive side effects, the silent outcome, and when not to use it, leaving no essential gap for correct invocation.

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?

The input schema already fully describes the 'steps' parameter as the number of mutations to revert with a default of 1, and schema coverage is 100%. The description reinforces this by referencing 'N mutations (steps, default 1)' but adds no new semantic information beyond 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?

The description clearly states the tool rolls back the last N mutations by truncating the journal and replaying it, which is specific and distinguishes it from siblings. It also names the sibling tool 'revert' for a different use case, making the purpose unambiguous.

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?

It explicitly says to use 'revert' instead for session claims, providing a clear alternative and when-not-to-use guidance. It also describes the operational context of rolling back mutations with a configurable step count and default behavior.

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