Skip to main content
Glama

Pagetool

Create a site from raw HTML

create_site_from_html

BUILD 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

NameRequiredDescriptionDefault
htmlNoThe 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.
pagesNoBuild 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_nameNoOptional display name for the site (defaults to the document title, or "Imported site").
draft_tokenNoThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare a non-readonly, non-destructive, non-idempotent write; the description adds real behavior the annotations cannot express: no account or sign-in required, no LLM involvement, markup kept verbatim, the flattening is ONE-WAY, scripts/handlers/javascript: links are stripped, external/data:/framework image URLs are dropped and reported back, and the draft is editable or claimable for 7 days. That is exactly the mutation and data-loss context an agent needs before overwriting user markup.

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

Conciseness4/5

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

Front-loaded with the imperative "BUILD FIRST" followed by purpose, alternative routing, and caveats in priority order. Slightly dense with stacked clauses ("free, instant, no account and no sign-in") but nearly every sentence carries decision-relevant information.

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?

Covers the full lifecycle an agent needs: trigger, the sibling alternative, what gets stripped or dropped, where the result lands (same hosted publishable site), the preview_url to surface, and the 7-day edit window. With no output schema, naming preview_url and the reporting of dropped images fills the remaining gap.

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 coverage is 100% and the schema already documents html, pages, site_name and draft_token in depth, so the description does not need to re-explain them. The description's one added hint, that the markup is kept verbatim, is behavioral rather than parameter-level, so baseline 3 is right.

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

Purpose5/5

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

States a specific verb and resource ("Creates a live draft site from HTML you already have") and immediately distinguishes itself from the sibling that sounds similar ("Choose create_site_from_brief instead when you are authoring the site yourself"). An agent can pick between the two routes without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ("Call it immediately when the user brings you markup") and an explicit exclusion condition for the alternative (create_site_from_brief, when you are authoring and want editable sections). The when-to-use / when-not-to-use pair is fully spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources