Deploy a site (create or full-replace)
deploy_sitePublish a static site or single-page app to a live HTTPS URL on the account's platform subdomain (e.g. {name}.subsite.site). A new name creates the site. An existing name REPLACES EVERY FILE (files not in this call are deleted) and needs confirm:"I-want-to-replace-all-files"; preview with dryRun:true. Use update_site instead to change some files of an existing site. A 100-250 KB text file fits in this call with encoding:'gzip+base64' (gzip locally, then base64); use begin_deploy only when the files do not fit in one call. Ship a top-level 404.html for multi-page sites (otherwise unknown paths serve index.html) and use plain ASCII file names. Afterwards add_custom_domain can serve the site on the user's own domain.
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": {
"name": "<name>",
"files": "<files>"
},
"name": "deploy_site"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Site subdomain. Lowercase, 3-63 chars, alphanumeric + hyphens. Must not start or end with a hyphen. | |
| files | Yes | Either an array of {path, content, encoding?} entries OR a path->content map. Total payload <= 500 MB. | |
| dryRun | No | Validate and preview without writing; deletedFiles lists what would be removed. Recommended before replacing an existing site. | |
| confirm | No | Required when the site already exists: exactly "I-want-to-replace-all-files", confirming that every existing file is deleted and replaced. Omit for a new site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Live URL of the site. | |
| dryRun | No | True on a dry run: nothing was written or deleted. | |
| siteId | Yes | ||
| created | Yes | True if this call created the site. | |
| warnings | No | Non-blocking findings: DOTFILE_PUBLIC (a public .well-known file) or detected secrets such as API keys or JWTs. | |
| manageUrl | No | Dashboard page where the user manages this site (domains, versions, settings). Omitted on dry runs. | |
| deletedFiles | Yes | Files that existed before this call and were removed by it. Empty for a new site. | |
| customDomains | No | Custom domains of this site and the team's custom-domain allowance; null when they could not be read. Omitted on dry runs. | |
| customHeaders | No | Result of syncing the _headers file in the site root (site-wide /* response headers). | |
| filesDeployed | Yes |