Roll back a Cloudflare Pages project
cloudflare_pages_rollbackRoll 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
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | The label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label. | |
| project | Yes | The Pages project's name, as `list` shows it: 1–58 lowercase letters, digits and `-`, starting with a letter or digit. | |
| replaces | Yes | The 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. | |
| deployment | Yes | The 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
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | The account label. | |
| project | Yes | The Pages project's name. | |
| replaced | Yes | The production deployment that served before. | |
| deployment | Yes | The deployment serving now, as Cloudflare reports it. |