Replace a preview site's files
update_siteReplaces all files of an existing preview site with the files given (send the complete site, not only changed files). The address and expiry date stay the same. Requires the site_token from publish_site.
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": {
"site_name": "<site_name>",
"site_token": "<site_token>",
"files": "<files>"
},
"name": "update_site"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Every file of the site, including a top-level index.html. Up to 300 files, 2 MB each, 10 MB in total. Allowed types: html, htm, css, js, mjs, json, map, webmanifest, txt, md, xml, csv, svg, png, jpg, jpeg, gif, webp, avif, ico, woff, woff2, ttf, otf, mp3, mp4, webm, pdf. For a built app (React, Vite...), send the build output folder (e.g. dist/), not the source. | |
| site_name | Yes | The site name returned by publish_site, e.g. "rosies-bakery". | |
| site_token | Yes | The site_token returned by publish_site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| site_name | Yes | ||
| expires_at | Yes | ||
| total_bytes | Yes | ||
| files_published | Yes |