update_page
Change a hosted page destructive
Description
Change a page published with publish_page. files [{path, content | url}] add or replace just those files and the rest are kept from the live version; remove [paths] deletes files; html replaces index.html; replace:true publishes exactly the files sent. Each change is a new version with its own preview link; live:false keeps the live page as it is. setLive <version> with no files makes an existing version live: a rollback, or bringing back an unpublished page. abTest {version, split} runs an A/B test: that version for split% of visitors (default 50), the live one for the rest; abTest:false ends it. A site without robots.txt / sitemap.xml gets them generated. get_page file returns a file's current source to edit. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
namerequired | string | the page name, which is its address: spring-sale is served at https://spring-sale.hermoso.page |
html | string | the new index.html |
files | object[] | files to add or replace |
files[].pathrequired | string | relative path inside the site, e.g. index.html, css/site.css, img/hero.webp |
files[].content | string | the file content: text, or base64 with encoding base64 |
files[].encoding | "utf-8" | "base64" | utf-8 (default) for text, base64 for binary |
files[].url | string | instead of content: the url of a file put through upload_file (or any public https file) |
remove | string[] | paths to delete, e.g. ["old.html"] |
replace | boolean | true = the new version holds exactly the files sent |
live | boolean | false = save as a preview only |
setLive | number | make this existing version live (no files needed) |
badge | boolean | false takes the Made with Hermoso badge off (paid plans); no files needed |
cookieBanner | boolean | cookie banner + privacy page on or off; no files needed |
abTest | object | boolean | test a version against the live one; false ends the test |
abTest.versionrequired | number | the variant version (publish it with live:false first) |
abTest.split | number | percent of visitors who see it, 1-99, default 50 |
title | string | |
note | string | what this version changes |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/update_page.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"update_page","arguments":{"name":"<string>"}}}
CLI
hermoso call update_page --json '{"name":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
publish_pagePublish a web page (Hermoso hosts it)get_pageRead a hosted pagelist_pagesList hosted pagesunpublish_pageTake a hosted page offlineconnect_domainServe a page on your own domaindomain_statusCheck a connected domaindisconnect_domainDisconnect a domain from a pageset_site_secretSave a secret for a site’s server codedelete_site_secretDelete a site secretrollback_pageRoll a hosted project back