Skip to main content
Glama

Runledge

Roll back a run

compensate_run
Idempotent

Start a rollback for a multi-step run. Returns the undo steps each action declared, newest first. Runledge does not call providers: execute each step yourself, then call record_action with compensates_action_id. Set dry_run to only read the run state. Requires member role.

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": {
      "workspace_id": "<workspace_id>",
      "run_id": "<run_id>"
    },
    "name": "compensate_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNo
run_idYes
dry_runNo
workspace_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the tool does not call providers, the caller is responsible for executing and then recording each step, steps are returned newest-first, and member role is required. The destructiveHint=false annotation is consistent with this, since the actual undo is performed by the client rather than the server.

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 short sentences, front-loaded with the action and return shape, then the follow-up contract, the dry_run flag, and the permission requirement. No sentence repeats the name or the schema, and nothing could be removed without losing a distinct fact.

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?

Covers the essentials for a mutating tool with no output schema: what comes back, in what order, who must execute it, the follow-up call, an auth precondition, and a preview mode. Remaining gaps are the purpose of the reason field and failure behavior (e.g., invalid or non-rollbackable run).

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 0%, so the description carries the full burden, and it only partly does: dry_run is explicitly explained ('only read the run state') and run_id is implied by 'multi-step run'. workspace_id and especially reason (maxLength 500, default empty) receive no semantic explanation at all.

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 ('Start a rollback for a multi-step run') plus the return content ('the undo steps each action declared, newest first'), so an agent knows exactly what this does. It also implicitly distinguishes itself from record_action, which the description names as the follow-up step rather than the rollback initiator.

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 a precise two-phase workflow: call this to get undo steps, execute them yourself, then call record_action with compensates_action_id. It also names dry_run as the read-only alternative path. What it lacks is any exclusion guidance such as when not to roll back, or behavior for runs with no declared compensations.

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