Skip to main content
Glama

Roll back a Cloudflare Pages project

cloudflare_pages_rollback
Destructive

Roll a Cloudflare Pages production deployment back or forward to a successfully built deployment after confirmation, refusing preview, skipped, failed, and stale targets.

Instructions

Roll a Cloudflare Pages project's production back, or forward, to a production deployment that built successfully; the tool always asks first in attended runs. The arguments come from cloudflare_pages_read deployments: replaces is the id of the deployment marked live (the one serving production now), deployment the id of the one to serve, older or newer. A preview, a skipped deployment and a failed build are refused, and so is the deployment serving now; stale means another deployment or rollback came first, so read the deployments again before trying again. No new deployment is made: the project serves the chosen one at once, and rolling back to the one it replaced undoes it. The result holds the deployment it replaced and the one serving now. Building and deploying stay with Git and Wrangler.

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": "<project>",
      "deployment": "<deployment>",
      "replaces": "<replaces>"
    },
    "name": "cloudflare_pages_rollback"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountNoThe label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label.
projectYesThe Pages project's name, as `list` shows it: 1–58 lowercase letters, digits and `-`, starting with a letter or digit.
replacesYesThe id (a UUID) of the production deployment serving now: the one cloudflare_pages_read deployments marks live. The call is refused as stale when another deployment or rollback came first.
deploymentYesThe id (a UUID) of the production deployment to serve, as cloudflare_pages_read deployments shows it; older or newer than the one serving now.

Output Schema

NameRequiredDescriptionDefault
labelYesThe account label.
projectYesThe Pages project's name.
replacedYesThe production deployment that served before.
deploymentYesThe deployment serving now, as Cloudflare reports it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The description still adds real context the annotations cannot: it always asks first in attended runs, no new deployment is created, the swap is immediate, and rolling back to the replaced deployment undoes it. It does not disclose scope of impact (e.g. whether in-flight requests or custom domains are affected).

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 action and the attended-run confirmation, then proceeds to argument sourcing, refusal cases, stale handling, and side effects. Dense and largely waste-free, though the clauses are packed into long sentences that a reader must parse carefully.

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 mutation with an output schema and fully documented parameters, the description covers everything the schema cannot: confirmation behavior, refusal causes, stale retry semantics, absence of a new build, reversibility, and what the result contains. Nothing an agent needs to invoke it correctly is missing.

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?

With 100% schema coverage the baseline is 3, and the description earns a bit more by framing `replaces` as the deployment currently serving production and `deployment` as the one to serve, older or newer. This is a semantic gloss on parameters the schema already documents in near-identical terms, so the added value is modest rather than large.

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 – rolling a Pages project's production to a deployment that built successfully – including the non-obvious case that it can move backward or forward. It also names the sibling that supplies the ids (cloudflare_pages_read deployments), so an agent can tell it apart from workers_rollback and the read tools.

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?

Explicit about where the arguments come from (deployments from cloudflare_pages_read), which inputs are refused (preview, skipped deployment, failed build, and the deployment serving now), and what to do on `stale` – re-read the deployments before retrying. That is concrete when-to-use and when-not-to-use guidance with a recovery path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.