Skip to main content
Glama

Sergio by Serviche

Undo a flow change

revert_flow_revision
Idempotent

Undoes a flow change the way the Automations editor's Recent changes does, writing the flow's prior snapshot back. Pass revisionId to undo one flow's change, or batchId to undo one apply that touched several flows at once (the 5-second Undo toast). read('flow_revisions', { flow }) lists a flow's changes, newest first, each with its id, summary, created_at and whether it was already reverted_at; a change already undone is refused rather than applied twice. Nothing is sent. Pass the same idempotency_key when retrying; a repeat returns the same answer.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "idempotency_key": "<idempotency_key>"
    },
    "name": "revert_flow_revision"
  }
}

Input Schema

NameRequiredDescriptionDefault
batchIdNoUndo one apply that touched several flows: the revision's batch_id from read('flow_revisions').
revisionIdNoUndo one flow's change: the revision id from read('flow_revisions').
idempotency_keyYesYour id for this operation (8-128 of A-Z a-z 0-9 . _ : -). Reuse it on every retry of the same operation; use a new one for a new operation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, and the description reinforces but does not contradict them by framing the write as a snapshot restore. It adds genuinely non-obvious behavior: no outbound sends ('Nothing is sent'), double-revert refusal, and retry semantics tied to idempotency_key. It stops short of describing what a successful response contains or any scope/partial-failure behavior for a multi-flow batch.

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?

Front-loaded with the core action, then the two modes, then discovery, refusal, and retry semantics — a sensible ordering with little filler. It is densely packed into a few run-on sentences, so a small amount of structural separation would improve scanability, but no sentence is genuinely expendable.

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 three-parameter mutation with no output schema, the description covers input discovery, both call modes, idempotent retry, and the already-reverted refusal path. The one real gap is that, absent an output schema, it never says what a successful revert returns beyond 'the same answer' on repeat.

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 description coverage is 100%, so the baseline is 3; the description nevertheless adds meaning — that batchId corresponds to 'one apply that touched several flows at once (the 5-second Undo toast)' and that idempotency_key reuse yields the same answer on repeat. Those are semantic and behavioral clarifications beyond the schema text, though the core per-parameter definitions largely mirror what the schema already says.

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 and resource ('Undoes a flow change') plus the exact mechanism ('writing the flow's prior snapshot back'), which is far more precise than a generic 'revert' label. It immediately separates its two operating modes (revisionId for one flow, batchId for a multi-flow apply) so an agent can tell what this does versus editing or creating a flow.

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 says which parameter selects which scenario, names the sibling tool that supplies them (read('flow_revisions', { flow }), newest first, with id/summary/created_at/reverted_at), and states the exclusion rule: an already-reverted change is refused rather than applied twice. That is when-to-use, how-to-discover-inputs, and when-not-to-expect-success in one place.

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.

Resources