Skip to main content
Glama

rollback

Destructive

Preview and undo a workflow's completed steps in reverse order, showing blockers and steps left applied; set confirm to apply.

Instructions

[WRITE] Abort a workflow and rollback completed steps in reverse order.

Without confirm=True this only previews: it returns blast_radius — the workflow's id, type and state, the executed steps whose rollback_tool would run with its rollback_params, secrets redacted (would_roll_back — these often carry confirm=True, and this call's confirm=True is the decision to run them), the executed steps that have none and stay applied (left_in_place), steps you performed from pending_dispatch that Pilot will not reverse (not_reversed_by_pilot: they have an undo you must call; not_reversible_outside_pilot: they have none — a clone, a production resize), undos that would leave something behind (leaves_behind on a would_roll_back entry), steps with unknown effects, and blockers — and changes nothing. Show that to the user and get their explicit decision. Do not set confirm=True on your own because the user asked for a rollback earlier — the user has not seen the preview yet.

Nothing rolls back automatically: a failed step leaves the workflow 'failed' and stops. This tool is the explicit, best-effort undo, and it only reverses steps pilot itself recorded as 'success' — without --dispatch, approval gates only. Steps YOU performed from pending_dispatch are 'not_executed' (or 'reported_done' once acknowledged at a gate) here, so to undo them call each one's rollback_tool with its rollback_params yourself, last step first. Embedders that pass a dispatcher to WorkflowExecutor get those calls made for them. Steps without a rollback_tool are reported 'not_reversible' and stay applied; an undo that does not remove what the step created is 'partial' (a clone powered off stays). A failed undo does not stop the rest. The workflow state is set to 'failed' afterwards.

Refused with confirm=True: a workflow in draft, completed, rolling_back or cancelled state, a step whose status Pilot does not recognise, a workflow record that cannot be read, and — unless acknowledge_unknown_effects=True — a step left 'running' or 'interrupted' by a Pilot process that stopped mid-dispatch (listed in unknown_effects).

Returns: Preview: {"action": "preview", "blast_radius", "hint"}. Acting: the workflow state with "action": "rolled_back" ("rollback_incomplete", with outcome "failed" and an error naming them, when an undo failed or its effect is unknown), rollback_results for each step pilot recorded as succeeded, and blast_radius. Check get_workflow_status afterwards to see which steps were actually reversed and which were skipped.

Input Schema

NameRequiredDescriptionDefault
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
workflow_idYesThe workflow ID to rollback.
acknowledge_unknown_effectsNoSet True only after the user has checked, in the target system, whether each unknown_effects step took effect. Covers only those steps; every other refusal still applies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.12.0
    • addedInput schema / properties / acknowledge_unknown_effects
      Added value: +{
      +  "default": false,
      +  "description": "Set True only after the user has checked, in the target system, whether each unknown_effects step took effect. Covers only those steps; every other refusal still applies.",
      +  "title": "Acknowledge Unknown Effects",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "False (default) returns the blast radius and changes nothing. True applies it.",
      +  "title": "Confirm",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv1.11.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / workflow_id / description
      Added value: +"The workflow ID to rollback."
  3. First observedv1.5.22

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent, but the description goes well beyond: secrets are redacted, some steps stay applied (left_in_place), some are not_reversible or partial, a failed undo does not halt the rest, and the workflow is left in 'failed'. It also enumerates the exact refusal set and the acknowledge_unknown_effects escape hatch.

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 preview/act distinction and the user-decision warning are front-loaded, and nearly every sentence carries operational weight. It is nevertheless a dense wall of parenthetical clauses that could be tightened without losing meaning.

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?

Despite no output schema, the description documents both return shapes (preview vs acting, including rollback_incomplete and rollback_results), the terminal state, and the follow-up step of checking get_workflow_status. Nothing an agent needs to call this destructive tool safely is missing.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description adds real meaning: confirm=True is framed as the user's explicit decision (not a re-confirmation of an earlier request), and acknowledge_unknown_effects is scoped to only the unknown_effects steps and only after the user has checked the target system.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+scope: '[WRITE] Abort a workflow and rollback completed steps in reverse order,' and defines itself as the 'explicit, best-effort undo' distinct from an automatic abort. It never names a sibling (e.g. cancel_workflow) or contrasts itself against one, so the reader must infer the boundary rather than being told it.

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?

Explicitly states the when-not: without confirm=True it only previews, the agent must show blast_radius to the user and get an explicit decision, and must not set confirm=True on its own. It also names the alternative path for pending_dispatch steps (call each step's own rollback_tool, last step first) and lists every refusal condition.

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