Publish a multi-file site
publish_filesPublishes several files at once to an existing site (use create_site first for a new one). Send index.html plus any other files: css/style.css, js/app.js, about.html, images or fonts. index.html becomes the page (previous version kept in history); other HTML pages (about.html, offer/prices.html) are published at the site root with clean addresses (/about); all other files go to assets/ with their folders kept, and relative links are rewritten automatically, so write normal relative paths like "css/style.css" and "about.html". Text files: put the code in content. Binary files (png, jpg, webp, woff2…): content is base64 and encoding is "base64". Omit index.html to only add or replace files. Limits: 300 files, 10 MB per file, 20 MB in total, the account storage limit. Allowed: html, css, js, json, images (jpg, png, gif, svg, webp, avif, ico), fonts (woff, woff2, ttf, otf), txt, xml, pdf. Use dry_run=true to preview.
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": "<site>",
"files": "<files>"
},
"name": "publish_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site id or name, e.g. "my-portfolio" or "my-portfolio.hostilo.page" (from list_sites). | |
| files | Yes | Files to publish. | |
| dry_run | No | Only report what would be published; nothing is changed. | |
| clear_assets | No | Delete all current files in assets/ before publishing. | |
| expected_version | No | Optional: the version from get_site. If the site was saved by someone else since then, nothing is published and you get a version_conflict error (get the site again and merge). |