Skip to main content
Glama

project_rollback

Idempotent

Roll back the last deploy, on every plan. The code flips to the previous working version immediately: the version that was live just before the current one. By default this changes code without restoring data. Give a version number to restore a retained deploy from the last 24 hours on Free or any retained deploy on paid plans. Restoring by number leaves the database schema and data unchanged. If the project uses a managed database (db/schema.ts), the response also returns a schema plan in plain language — what the previous version expects of the database vs. what it looks like now — WITHOUT changing the schema. with_schema: true also rolls the schema back; it re-deploys the previous version's schema through the normal deploy path, so a column the new version added is refused (not silently dropped) and a column the old version still declares is restored from retention. Data is never touched beyond the retention/restore window. preview: true reviews before applying — it changes NOTHING and returns target_version (the version it would restore); that value as expected_target_version confirms it, and the rollback is refused (ROLLBACK_TARGET_CHANGED) if the live version moved since your preview, so the rollback never lands on a different version than the one you reviewed.

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": {
      "project_id": "<project_id>"
    },
    "name": "project_rollback"
  }
}

Input Schema

NameRequiredDescriptionDefault
previewNoNon-writing preview that returns the schema plan and target_version. False is the default; the returned target_version is the confirmation value for expected_target_version.
versionNoRestore this retained version by number. Free covers the last 24 hours. Paid plans cover any retained version. Use version without the schema or preview options.
project_idYesProject ID, subdomain, or 'default'.
with_schemaNoAlso rolls the managed database schema back through the normal deploy path. False (default) rolls back code and shows a schema plan while leaving the schema unchanged pending confirmation.
expected_target_versionNoThe target_version returned by a preview. ROLLBACK_TARGET_CHANGED refuses a rollback when the current target differs, preventing confirmation from applying to another version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / version / description
      Previous value: -"Restore this retained version by number on paid plans. Use version without the schema or preview options."New value: +"Restore this retained version by number. Free covers the last 24 hours. Paid plans cover any retained version. Use version without the schema or preview options."
  2. Changed1 schema field changed
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Restore this retained version by number on paid plans. Use version without the schema or preview options.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that code is what changes by default, that data is never touched beyond the retention window, that schema is left unchanged unless with_schema, that a newly added column is refused rather than silently dropped, and the exact refusal code on a stale preview. The safety claims are consistent with destructiveHint=false and idempotentHint=true rather than contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense block of long sentences with some repetition ('the previous working version immediately: the version that was live just before the current one'; 'Data is never touched beyond the retention/restore window' restates the earlier no-data-change claim). The purpose is front-loaded, but the preview/expected_target_version mechanics are buried at the end and would be easier to parse as separated clauses.

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?

There is no output schema, so the description carries the return burden and does: the plain-language `schema` plan for managed databases and the `target_version` from preview are both explained. For a 5-parameter mutation tool the agent has enough to call it safely and interpret the result.

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 a 3 is the baseline, and the description earns above that by explaining the coupling between parameters – that preview's returned target_version is the value fed into expected_target_version, and that with_schema re-deploys through the normal deploy path. Retention windows (24h Free vs. any retained on paid) are restated from the schema rather than added, which caps it below 5.

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?

States a specific verb and resource ('Roll back the last deploy') and immediately scopes it ('on every plan') plus the default target ('the version that was live just before the current one'). It never names a sibling, though – notably not project_restore_version, which the 'give a version number to restore a retained deploy' sentence makes it resemble, so the agent must infer from names alone which of the two to pick.

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 explicit branch conditions for each optional parameter: omit version to take the last deploy, pass version for a retained one, with_schema to also roll the schema, preview to review without applying. It also states when the tool refuses (ROLLBACK_TARGET_CHANGED). What's missing is comparative guidance against the sibling restore/undeploy tools.

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