deploy_to_cloudflare_pages
Deploy built static sites or React/Vite SPAs to Cloudflare Pages, with optional custom-domain and DNS setup, or use the ready pages.dev URL when no domain is owned.
Instructions
Deploy a static website to Cloudflare Pages. Supports landing pages with nested image/assets and React/Vite single-page apps. If domain is omitted, the deployment URL works without owning a domain; if provided, bind it and configure Cloudflare DNS when possible.
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_name": "<project_name>",
"dir_path": "<dir_path>"
},
"name": "deploy_to_cloudflare_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Deployment branch; defaults to main. | main |
| domain | No | Optional custom domain to bind after deployment, for example www.example.com. Omit if you do not own a domain; the pages.dev URL is ready to use. | |
| dir_path | Yes | Absolute or relative path to the built static directory, which must contain index.html. | |
| spa_mode | No | Enable for React/Vite apps using client-side history routes. Adds a Cloudflare Pages fallback to index.html. Leave false for traditional multi-page static sites. | |
| project_name | Yes | Cloudflare Pages project name. |