Skip to main content
Glama

Publish HTML as a hosted link

publish_html

Publish a self-contained HTML document and get back a public URL. Use this whenever the user wants to share, send, or host HTML you produced — a report, dashboard, deck, prototype or one-page site — instead of leaving it as a file they cannot open. The HTML must be self-contained: inline the CSS and JS, or reference them by absolute URL.

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": "publish_html"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe full, self-contained HTML document to publish. Max 1MB on the free plan, 10MB on Pro, 50MB on Studio/Agency.
slugNoOptional custom path, e.g. 'q3-report' → /p/q3-report. 2–64 lowercase letters, digits and internal hyphens. Requires a paid plan (Pro or above); omit for a random slug.
titleNoHuman-readable title. Sets the link-preview title — pass a real one, not a filename.
passwordNoOptional password (4–72 characters). Viewers must enter it to see the page. Paid plans only; omit for a public page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the key behavioral trait that the output is a public URL and that input must be self-contained. It omits other meaningful behavior: that publishing makes content publicly reachable by anyone with the link, whether re-publishing to the same slug overwrites, and whether/how a page can be unpublished or deleted.

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

Conciseness5/5

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

Three sentences, front-loaded with the action and result, then usage triggers, then the hard input constraint. No sentence is redundant and the most failure-prone rule (self-containment) is placed last where it reads as a requirement.

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

Completeness4/5

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

No output schema exists, and the description does supply the return value (public URL), which is the critical missing piece for a publish tool. Remaining gaps are lifecycle details — unpublish/overwrite semantics and visibility of published pages — which are secondary for a 4-parameter creation tool but not covered elsewhere.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds a genuine constraint not expressed in the schema: the html value must be self-contained with CSS/JS inlined or referenced by absolute URL. That is a validation rule an agent must satisfy to call the tool correctly, so it exceeds the baseline.

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?

The description states a specific verb and resource ('Publish a self-contained HTML document') and the concrete outcome ('get back a public URL'). That makes it immediately distinguishable from the only listed sibling, update_page, which implies modifying an existing page rather than creating a hosted link.

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?

It gives clear trigger conditions — 'whenever the user wants to share, send, or host HTML you produced' — plus concrete artifact examples (report, dashboard, deck, prototype, one-page site) and the anti-pattern it replaces ('leaving it as a file they cannot open'). It stops short of naming a when-not case or an alternative tool, so it is strong context without full routing.

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.