Create a site from raw HTML
create_site_from_htmlBUILD FIRST. Creates a live draft site from HTML you already have - free, instant, no account and no sign-in, fully deterministic with no language model involved. Call it immediately when the user brings you markup, then show them the returned preview_url. Choose create_site_from_brief instead when you are authoring the site yourself and want every section to stay editable in the Pagetool editor: this route keeps the markup verbatim and the flattening is ONE-WAY. Both routes end in the same hosted, publishable site. Scripts, event handlers and javascript: links are always stripped, and external, data: and framework-internal image URLs are dropped and reported back to you. You can edit or claim this draft for 7 days from creation.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_site_from_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | The raw HTML to import. A full document or a bare fragment/section both work. Max 2 MB. Include the page CSS in a <style> block - inline and <style> CSS are mapped to the site styling; external stylesheet links are not fetched. To build several pages at once, pass pages instead. | |
| pages | No | Build a whole site in one call instead of html: a list of up to 10 pages, each { path, html, name? }, exactly one with path "/" (the home page), e.g. [{"path":"/","html":"..."},{"path":"/about","html":"..."}]. Link between pages with href="/about". Every page is checked before anything is created. | |
| site_name | No | Optional display name for the site (defaults to the document title, or "Imported site"). | |
| draft_token | No | The draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header. |