Skip to main content
Glama
WebCake Landing MCP

WebCake Landing MCP

by vuluu2k

ingest_html

Read-only

Parses raw HTML into a reference AST for rebuilding or adapting a Webcake landing page, extracting sections, headings, images, CTAs, colors, fonts, and design tokens.

Instructions

Parses an HTML string into a reference AST for rebuilding the page in Webcake: title, description, og_image, language, and sections classified by role (header, hero, features, about, form, cta, gallery, testimonials, pricing, faq, footer, unknown), each with headings, paragraphs, images, CTAs, links, form fields and a size_hint (desktop section height in px — from CSS when explicit, else estimated). Also returns top colors, fonts, palette and background_images; for Tailwind-CDN pages (e.g. Google Stitch) the palette and design_tokens (spacing grid, corner radii, type scale) come from the page's tailwind.config. detail:'compact' (default, ~2–5 KB) or 'full' (up to ~25 KB: per-section blocks such as cards and steps, lists, gradients, images as { src, alt }, and widgets — the cleaned HTML + CSS of composite visuals such as device mockups). Fonts: font_groups lists self-hosted fonts from @font-face rules in the settings.fontGroups shape; typography and per-section text_styles give the computed font size (desktop and mobile), weight, family, line height and letter spacing. Absolute-canvas builder exports (LadiPage-family or Webcake-published HTML) are detected and converted deterministically into a complete Webcake page source, with clone_notes listing approximations and canvas_summary summarizing per-section geometry; external images in that source are re-hosted automatically when it is saved. Garbled Vietnamese text (UTF-8 read as Latin-1) is repaired, with a warning. No credentials, no writes.

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": {
      "html": "<html>"
    },
    "name": "ingest_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesRaw HTML of a page or a section.
detailNoLevel of detail in the returned AST. 'compact' (default, ~2–5 KB): sections, top colors and fonts. 'full': adds the CSS custom-property palette (design tokens by name), background_images from stylesheets, gradients, per-section blocks (repeating card/tile/step structures with title/body/image/cta), li lists, extended paragraphs, images as { src, alt }, and per-section widgets = { hint, html, css? } — the cleaned source HTML + matching CSS of composite visuals (device mockup, chat thread, dashboard, browser frame). Both levels lift the design system from a `tailwind.config` block when present (Google Stitch / Tailwind-CDN pages): `palette` named by token (e.g. primary → #a43b38), `colors` ranked by usage, and `design_tokens` with the resolved spacing grid, corner radii and type scale (e.g. display-lg → 48px). Image URLs in the result (images, background_images, og_image) belong to the source page. Absolute-canvas builder exports return the deterministic `source` at either level.
intentNoHow the result will be used. 'adapt' (default): the reference provides layout and imagery while the text is rewritten for the user's brand. 'clone': a faithful copy — when the host has a browser (Playwright) the page is MEASURED like clone_page and the result is a ready `draft_id` (mode:'browser_clone') to save with create_page({ draft_id }); without one the AST comes back with a warning. Absolute-canvas exports return a clone `source` either way.
base_urlNoThe page's original URL, when the HTML was saved or copied from a live site. Resolves relative font and image URLs and fetches the page's external stylesheets (+ @imports), so self-hosted fonts (`font_groups`) and computed type (`typography` / `text_styles`) defined outside the HTML are included.
sectionsNoAbsolute-canvas mode only: return only these canvas section ids (from a previous result's canvas_summary.sections[].id; 'SECTION_POPUP' selects the popups). A full-page result marked canvas_summary.truncated:true has its styles pruned to fit the size cap; per-section results carry each section's `source` untrimmed, and `source.page[0]` is a single section node.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.1
    • changedInput schema / properties / intent / description
      Previous value: -"How the result will be used. 'adapt' (default): the reference provides layout and imagery while the text is rewritten for the user's brand. 'clone': text and images stay close to the original. Absolute-canvas exports return a clone `source` either way."New value: +"How the result will be used. 'adapt' (default): the reference provides layout and imagery while the text is rewritten for the user's brand. 'clone': a faithful copy — when the host has a browser (Playwright) the page is MEASURED like clone_page and the result is a ready `draft_id` (mode:'browser_clone') to save with create_page({ draft_id }); without one the AST comes back with a warning. Absolute-canvas exports return a clone `source` either way."
  2. Changed4 schema fields changedv1.5.11
    • addedInput schema / properties / base_url
      Added value: +{
      +  "description": "The page's original URL, when the HTML was saved or copied from a live site. Resolves relative font and image URLs and fetches the page's external stylesheets (+ @imports), so self-hosted fonts (`font_groups`) and computed type (`typography` / `text_styles`) defined outside the HTML are included.",
      +  "type": "string"
      +}
    • changedInput schema / properties / detail / description
      Previous value: -"Level of detail in the returned AST. Both levels also lift the design system from a `tailwind.config` block when present (Google Stitch / Tailwind-CDN pages keep the WHOLE design system there, not in CSS): `palette` is named by token (primary→#a43b38, surface-container-low→#f3f3f3 — map utility classes like text-primary/bg-surface-container-low back to it), `colors` is usage-ranked from the classes actually on the page, and `design_tokens` carries the resolved spacing grid, corner radii, and TYPE SCALE (e.g. display-lg→48px, xl→80px) — REBUILD from these tokens so sizing/spacing/color match the original. 'compact' (default) — backward-compatible ~2-5 KB shape with top colors/fonts from inline styles. 'full' — richer AST: CSS custom-property palette (design tokens by name), background_images from stylesheets, gradients, per-section blocks (repeating card/tile/step structures with title/body/image/cta), li lists, extended paragraphs, images as { src, alt } objects, and per-section widgets = { hint, html, css? } — the cleaned source HTML + matching CSS of composite visuals (phone/device mockup, chat thread, dashboard, browser frame) to rebuild VERBATIM as ONE html-box (inline the css; don't re-imagine the markup). Use 'full' for clone-faithful rebuilds. Image URLs found in the result (images, background_images, og_image) are the user's assets: re-host them via upload_images and reuse them in the generated page for BOTH intents (never hotlink, never replace them with search_images stock photos). NOTE: for absolute-canvas builder exports the deterministic `source` is returned regardless of detail."New value: +"Level of detail in the returned AST. 'compact' (default, ~2–5 KB): sections, top colors and fonts. 'full': adds the CSS custom-property palette (design tokens by name), background_images from stylesheets, gradients, per-section blocks (repeating card/tile/step structures with title/body/image/cta), li lists, extended paragraphs, images as { src, alt }, and per-section widgets = { hint, html, css? } — the cleaned source HTML + matching CSS of composite visuals (device mockup, chat thread, dashboard, browser frame). Both levels lift the design system from a `tailwind.config` block when present (Google Stitch / Tailwind-CDN pages): `palette` named by token (e.g. primary → #a43b38), `colors` ranked by usage, and `design_tokens` with the resolved spacing grid, corner radii and type scale (e.g. display-lg → 48px). Image URLs in the result (images, background_images, og_image) belong to the source page. Absolute-canvas builder exports return the deterministic `source` at either level."
    • changedInput schema / properties / intent / description
      Previous value: -"How the caller intends to use the result. 'adapt' (default) — use as a layout reference and rewrite the TEXT for the user's brand (images from the reference are still re-hosted via upload_images and reused). 'clone' — keep text and images close to the original. For absolute-canvas exports the deterministic `source` is a clone either way."New value: +"How the result will be used. 'adapt' (default): the reference provides layout and imagery while the text is rewritten for the user's brand. 'clone': text and images stay close to the original. Absolute-canvas exports return a clone `source` either way."
    • changedInput schema / properties / sections / description
      Previous value: -"Absolute-canvas mode only: return ONLY these canvas section ids (use the ids from a previous call's canvas_summary.sections[].id; 'SECTION_POPUP' selects the popups). When a full-page call comes back canvas_summary.truncated:true (styles pruned to fit the size cap), re-call per section to get each section's `source` in FULL untrimmed detail — pairs naturally with building the page incrementally via add_section (pass that call's source.page[0] to add_section)."New value: +"Absolute-canvas mode only: return only these canvas section ids (from a previous result's canvas_summary.sections[].id; 'SECTION_POPUP' selects the popups). A full-page result marked canvas_summary.truncated:true has its styles pruned to fit the size cap; per-section results carry each section's `source` untrimmed, and `source.page[0]` is a single section node."
  3. First observedv1.5.0

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover only read-only/non-destructive/open-world; the description adds substantial behavior beyond them: no credentials and no writes, deterministic conversion of absolute-canvas builder exports, automatic re-hosting of external images on save, repair of garbled Vietnamese with a warning, and explicit size caps (~2–5 KB compact vs up to ~25 KB full, with style pruning when truncated). These are exactly the operational traits an agent cannot get from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first clause is correctly front-loaded with purpose, but the body is a single sprawling paragraph mixing output shape, mode switches, font internals, Tailwind extraction, canvas conversion and text repair, with much of it duplicating the schema. It is information-dense but poorly segmented, so an agent must parse a wall of text to find the when-to-use decision points.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates thoroughly: it describes the AST fields, the compact/full delta, the palette/design_tokens extension for Tailwind-CDN pages, font_groups/typography/text_styles, the `source` + clone_notes + canvas_summary return for canvas exports, and the sections filter behavior. An agent can anticipate the response shape and limits without a schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description's parameter information ('compact' default, `intent` adapt vs clone, base_url resolving relative URLs and pulling external stylesheets) largely restates what the schema already documents verbatim, adding little semantic meaning the agent could not read in the schema itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource — 'Parses an HTML string into a reference AST for rebuilding the page in Webcake' — and enumerates the extracted fields (title, sections with roles, colors, fonts) so the agent knows exactly what comes back. The input type ('HTML string') implicitly separates it from ingest_url, but no sibling is named explicitly, so differentiation is by inference rather than statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Guidance is strong on the two mode parameters: 'adapt' (rewrite text for the user's brand) vs 'clone' (faithful copy, with a draft_id only when the host has Playwright, otherwise a warning), plus compact vs full size expectations. What is missing is explicit routing against alternatives — it never says to use ingest_url when you have a URL, or clone_page when you want a live measurement done for you, so selection still relies on the agent comparing inputs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.