Skip to main content
Glama

Publish a new page

publish_page

Publish a new HTML (or Markdown) page to the maker's PubSpace space and get back a live, shareable URL to hand to the human. Pages are unlisted by default — indexed by search engines only if the maker turns that on later (Pro); anyone with the link can view. Use this only for a brand-new page; to change a page that already exists, call update_page so its URL stays the same (find the id with list_pages). Each call creates a page that counts toward the plan's live-page cap; at the cap the call fails with doc_limit_reached and, on the free plan, an upgrade link to relay to the human. Content that looks like live credentials (API keys, private keys, .env lines, database URLs with passwords) is refused with secrets_detected and the line numbers; remove them and retry. A page that works as a sign-in or payment form sending what people type to another site can be refused with unsafe_page_detected (no override): make such forms non-functional demos. Returns { url, id, mode, visibility, dashboardUrl }. Connected without an API key, it publishes a 7-day preview at a pubspace.page link instead (no account needed, up to 5 MB, no password, stricter sign-in lookalike check) and returns { url, id, mode, preview: true, expiresAt, claimToken, tell_user }: relay tell_user, and keep claimToken, the only way to change that page later (update_page with claim_token). Pass claim_token to add another page under the same token (up to 5 live previews). Later publishes in the same session join the first preview's token and do not return claimToken again: that first token covers them. To keep previews for good, call claim_page with the human's email.

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_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesFull HTML document (or Markdown when source_type is "markdown"), up to 15 MB on the free plan and 20 MB on Pro, so self-contained pages with embedded images fit; a free account's pages and drafts total up to 100 MB (past that: storage_limit_reached). Served byte-faithful apart from documented meta/bar injections. Over 5 MB the result adds a sizeNote with tips to shrink it.
titleNoOptional title (used in the dashboard and social cards).
projectNoOptional: which body of work this page belongs to (e.g. "Q3 board pack"). Groups pages in the maker's library — reuse their existing project names from list_pages when one fits. (Renamed from `product` in v0.16.0; the old name is still accepted.)
claim_tokenNoKeyless previews only: the claimToken from an earlier preview, to add this page under the same token. Ignored when connected with an API key.
source_typeNoDefault "html".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / claim_token
      Added value: +{
      +  "description": "Keyless previews only: the claimToken from an earlier preview, to add this page under the same token. Ignored when connected with an API key.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / html / description
      Previous value: -"Full HTML document (or Markdown when source_type is \"markdown\"), up to 20 MB, so self-contained pages with embedded images fit. Served byte-faithful apart from documented meta/bar injections. Over 5 MB the result adds a sizeNote with tips to shrink it."New value: +"Full HTML document (or Markdown when source_type is \"markdown\"), up to 15 MB on the free plan and 20 MB on Pro, so self-contained pages with embedded images fit; a free account's pages and drafts total up to 100 MB (past that: storage_limit_reached). Served byte-faithful apart from documented meta/bar injections. Over 5 MB the result adds a sizeNote with tips to shrink it."
  3. Changed1 schema field changed
    • changedInput schema / properties / html / description
      Previous value: -"Full HTML document (or Markdown when source_type is \"markdown\"). Served byte-faithful apart from documented meta/bar injections."New value: +"Full HTML document (or Markdown when source_type is \"markdown\"), up to 20 MB, so self-contained pages with embedded images fit. Served byte-faithful apart from documented meta/bar injections. Over 5 MB the result adds a sizeNote with tips to shrink it."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly/openWorld/idempotent/destructive) by disclosing default visibility, who can view, the live-page cap and the doc_limit_reached failure, two refusal modes (secrets_detected with line numbers, unsafe_page_detected with no override), the exact return shape, and the entire keyless preview mode with its 7-day expiry, 5 MB cap and stricter checks. This is the kind of failure-mode and side-effect detail annotations cannot express.

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 purpose, then routing, failure modes, return value, and preview mode in a logical order, and nearly every clause carries operational information. It is a single dense paragraph of run-on sentences, though, so the error codes and preview sub-flow would be easier to scan if separated.

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 both connected and keyless operating modes, the three failure codes an agent may hit, the exact return payloads for each mode, and the token-handling rules that govern follow-up calls. Nothing needed to invoke this correctly or handle its outcomes is missing, even though no output schema exists.

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 baseline is 3, but the description adds genuine meaning for claim_token: it explains token inheritance across later publishes in the same session, the 5-live-preview ceiling, and that the first token covers subsequent pages. It also clarifies the html/markdown relationship via source_type, though title and project are left to the schema.

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?

Opens with a specific verb and resource ("Publish a new HTML (or Markdown) page") plus the outcome ("get back a live, shareable URL"), and immediately distinguishes itself from update_page for the modify case. An agent can tell exactly what this tool produces without opening the 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?

Explicitly scopes use to brand-new pages and routes the alternative case to update_page with the reason (URL stability) and the discovery step (find the id with list_pages). It also names the terminal follow-up path (claim_page with the human's email) so the agent knows the next step in the preview lifecycle.

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