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. Refuses projects that are not on storage commit v2 (the dashboard rollback flow owns those). 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.

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.6/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses that the call is asynchronous, returns immediately with a rollback_id, may take minutes, can destroy data in restore_data mode, stops the app/database during restore, leaves a safety copy, allows only one rollback at a time, and requires a read-write token. These are exactly the operational risks an agent needs before invoking it.

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 most important danger and async behavior are front-loaded, and nearly every clause carries operational value. However, it is a dense run-on paragraph, and breaking out mode behavior and status semantics would make it easier to scan.

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 production operation, the description covers lifecycle, mode differences, irreversibility, status interpretation, refusals, and authorization. An output schema exists, so return-value details need not be repeated.

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?

The schema has 100% description coverage and already documents job_id, mode, and point_id in detail. The description reinforces job_id and mode semantics but does not mention point_id and adds little parameter-level meaning beyond the schema, 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 states a specific verb and resource: it STARTS a rollback of a storage commit v2 project's canonical production pointer to an earlier commit identified by job_id. It also clearly distinguishes the two modes and names related tools such as get_rollback_status and list_deployments.

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?

It explicitly covers when to use each mode, including that keep_data is the safe default and restore_data destroys data. It also explains when to use get_rollback_status, what list_deployments and get_app_status can show mid-rollback, and when the tool refuses projects or commits.

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