Skip to main content
Glama

cancel_operation

Cancel the active operation and roll back all changes made since it started. Restores from checkpoint when available, otherwise steps the undo stack to discard edits.

Instructions

Abandon the open operation and roll back.

With a checkpoint this reloads it, which DISCARDS everything done since begin_operation -- including any of the user's own edits in that window. Without one it falls back to stepping the undo stack, which is best effort; the response says which path was taken.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
undo_stepsNoUndo steps to try when there is no checkpoint
restore_checkpointNoRestore from the operation's checkpoint. Defaults to true when one exists -- the only reliable rollback.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It explicitly warns that checkpoint reload 'DISCARDS everything done since begin_operation — including any of the user's own edits,' and accurately labels the undo-stack fallback as 'best effort' while noting the response reveals which path was taken. This is excellent disclosure of destructive, partial-recovery behavior.

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?

Three short sentences front-load the core action and the destructive warning, then cover the fallback path and response signal. There is no wasted wording, and the description does not repeat schema content unnecessarily.

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 tool with no annotations and no output schema, the description covers the important decision paths: with a checkpoint, without a checkpoint, and what the response will indicate. It does not specify behavior when no operation is open or when the undo stack is exhausted, but the essential calling context is well covered.

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?

Both parameters are already fully described in the input schema (100% coverage), so the description does not need to re-document them. It adds only minimal parameter-level meaning beyond echoing the checkpoint-versus-undo distinction, so the baseline 3 is appropriate.

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 opens with a specific verb and object: 'Abandon the open operation and roll back.' It then explains the two rollback paths, which distinguishes it from siblings like undo, redo, and restore_checkpoint by tying the behavior to the open-operation lifecycle.

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 gives clear context for when cancel_operation applies: it abandons the open operation, uses a checkpoint when available, and falls back to undo-stack stepping otherwise. It does not explicitly name sibling alternatives or state when not to use this tool, so it stops short of fully explicit routing guidance.

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

Deploy Server

Other Tools