import_landing_page_html
Bring-your-own-HTML: import a landing page by pasting source or fetching a URL. Create a new page or overwrite an existing slug; optionally auto-create stub side pages.
Instructions
Bring-your-own-HTML: import an existing landing page from pasted HTML or a live URL. Synchronous — no polling needed. Pass exactly one of html (paste the full page source) or url (fetch and import from a live page). By default creates a brand-new landing page (optionally with name; the slug is always auto-generated). Pass convertExistingSlug instead to overwrite an existing landing page's content with the imported HTML. Set createMissingSidePages to true to auto-create stub side pages for internal links discovered in the HTML that don't already exist. Returns { landingPage: {id, slug}, report } where report audits the import: externalHosts (third-party domains referenced), relativeAssetPaths (local asset paths that may need re-hosting), placeholders (unresolved template tokens found), internalLinks (each { href, slug, existingSidePage }), themeExtracted (whether a theme was inferred from the HTML), truncated (whether the source HTML was cut down to fit limits), and extractability ({ verdict: 'ok'|'warn', reasons } — 'warn' means framework hydration scripts won't load post-import but static content still renders). If the source is a client-rendered app shell whose content depends entirely on framework scripts that can't be hosted here (e.g. a bare Next.js/React app shell), the import is refused before anything is persisted — this tool returns a non-throwing result { error: 'not_extractable', message, reasons } instead. Relay the reasons to the user and suggest pasting a static/exported HTML instead, or publishing directly from their site builder. Example: import_landing_page_html({ url: 'https://example.com/pricing', name: 'Pricing' }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Live page URL to fetch and import (URL mode). Provide this or `html`, not both. Scheme-less domains (e.g. "example.com") are accepted and default to https. | |
| html | No | Full HTML source to import (paste mode). Provide this or `url`, not both. | |
| name | No | Display name for the new landing page | |
| brandId | No | Brand ID (defaults to active brand) | |
| convertExistingSlug | No | Slug of an EXISTING landing page to overwrite with the imported HTML, instead of creating a new one | |
| createMissingSidePages | No | Auto-create stub side pages for internal links found in the HTML that don't already exist |