Skip to main content
Glama

Roll back production

rollback_commit
Destructive

Affects the live site and can destroy data. STARTS a rollback of a storage commit v2 project's canonical (production) pointer to an earlier commit (by job_id) and returns at once with a rollback_id: the reply means the rollback was accepted, never that it finished. A rollback takes a few minutes. get_rollback_status with that rollback_id reports its progress and its end: status done means production runs the target commit and, in restore_data mode, the app is running on the restored data; status failed carries the reason and says what changed. Until then list_deployments and get_app_status can already show the target commit as canonical and running while the data is not restored yet: only status done means the rollback is finished. mode=keep_data (the SAFE default): switch the pointer back, storage untouched — the outgoing canonical keeps running on its own clone. mode=restore_data: ALSO restore that commit's data snapshot onto the main volume, permanently destroying everything the app has written to storage since that snapshot was taken — irreversible from the app's side, everything written since is lost; the app or its database is stopped while the data is copied back. The one way back is the safety copy the platform takes just before the restore (safety_point_id in get_rollback_status; only the newest few are kept), restored in turn. keep_data refuses the canonical commit (the app is already on it); restore_data on the canonical commit moves no code and restores the data in place, which is how a failed data restore is retried and how a restore is undone. One rollback runs per project at a time. A refusal means nothing was started and nothing was changed. Requires a read-write token.

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": {
      "job_id": "<job_id>",
      "mode": "<mode>"
    },
    "name": "rollback_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesmode: "keep_data" | "restore_data". keep_data (the safe default): switch the canonical pointer back to this commit and leave storage untouched. restore_data: ALSO restore this commit's data snapshot onto the main volume, permanently destroying everything the app has written to storage since that snapshot was taken — confirm with the user first; keep_data is the safe choice
job_idYesthe deployment job id to roll the project's canonical (production) pointer back TO (from list_deployments); must belong to a storage commit v2 project. With mode=keep_data it must not be the current canonical commit; with mode=restore_data it may be, and the data is then restored in place
point_idNooptional restore point to bring the data back from, only meaningful with mode=restore_data; omit it to use this commit's own newest restore point, which is the default. A point id that no longer exists is refused rather than silently falling back to the default

Output Schema

NameRequiredDescriptionDefault
okYestrue when the rollback was STARTED (or parked for approval). It never means the rollback finished
statusNopresent, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first
messageYes
plan_idNopoll get_plan_status with this id for the eventual outcome
approve_atNothe kad.dev dashboard URL a human approves or rejects this plan from
rollback_idNopass this to get_rollback_status to follow the rollback to its end
expires_in_sNothe plan can no longer be approved after this many seconds
retry_after_sNowait at least this many seconds before the first get_rollback_status call, unless it is called with wait_s
rollback_statusNorunning: the rollback was accepted and is in progress. The final status (done or failed) comes from get_rollback_status

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, but the description adds substantial context they cannot carry: the call is asynchronous and returns rollback_id on acceptance only, takes minutes, permanently destroys everything written since the snapshot, stops the app/database during the copy, and is recoverable only via the platform safety copy. It also discloses auth requirements (read-write token) and that a refusal changes nothing.

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 critical warning ('Affects the live site and can destroy data') is correctly front-loaded and nearly every sentence carries unique operational information. It is, however, a single dense paragraph of roughly 300 words with no visual separation between async semantics, mode behavior, and constraints, which makes the mode-specific rules harder to scan than necessary.

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 destructive, asynchronous, data-destroying mutation this covers what an agent must know before calling: consequences, mode choice, confirmation implied by 'confirm with the user first' in the schema, polling path, auth, and failure semantics. An output schema exists, so return-value detail is appropriately delegated.

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; the description nonetheless adds meaning beyond the schema by explaining that keep_data refuses the canonical commit while restore_data on the canonical commit moves no code and restores data in place — the retry and undo semantics. The point_id parameter and the keep_data/restore_data tradeoff are already fully covered by the schema, so the added value is real but partial.

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 ('STARTS a rollback of a storage commit v2 project's canonical (production) pointer to an earlier commit') and immediately scopes it against siblings by naming get_rollback_status, list_deployments and get_app_status as different operations. An agent can distinguish this from redeploy or promote_commit without opening any schema.

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?

Gives explicit when-to-use per mode (keep_data = safe default, restore_data = also restore data), explicit when-not (keep_data refuses the canonical commit), and routes follow-up work to get_rollback_status. It even documents the retry/undo path (restore_data on the canonical commit) and the one-rollback-per-project constraint, leaving nothing to inference.

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