Skip to main content
Glama

Add a page to a website

add_page_to_site

Generate a new page inside an existing website and save it as a draft. The home page is created in the published state so site publishing includes it; the site itself is not published by this call. Use this rather than create_page whenever the page belongs to a site, so it inherits the site's brand and is served under the site's domain. The home page is the one with slug "index"; on a new site add it first, since later pages reuse its header, footer and theme and are linked from its menu. Find site ids with list_sites.

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": {
      "siteId": "<siteId>",
      "title": "<title>",
      "brief": "<brief>"
    },
    "name": "add_page_to_site"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoURL slug, e.g. "about" or "blog/launch". Lowercase words and hyphens; may nest with "/". Derived from the title when omitted, and de-duplicated against existing pages. Use "index" for the home page: it is honoured only while the site has no home page (or, on a site built with the html/v2 page engine, to retry a home page whose build failed); otherwise the call fails and you should edit the existing page instead.
briefYesWhat the page should contain: its purpose, audience, sections, and call to action. The richer this is, the better the page. Ignored when retrying a failed home page with slug "index": that rebuild reuses the page's original brief (use edit_page to change it).
titleYesPage title, e.g. "About us". Shown in the dashboard. A home page retry keeps the page's original name, and the result reports that.
siteIdYesThe site to add the page to (id from list_sites).

Output Schema

NameRequiredDescriptionDefault
noteYes
pathYesPath within the site, e.g. "/about".
slugYesThe slug actually used, which may differ from the one requested: it is normalised and de-duplicated against existing pages.
titleYes
pageIdYesPage UUID. Pass to get_page / edit_page.
siteIdYes
statusYesThe home page (slug "index") starts published, so publishing the site includes it; other pages start as drafts. Neither means the site is live.
editUrlYes
finalizedYesFalse when the page generated and saved but its dashboard record didn't finish updating. The page itself is fine; the list may lag.
previewUrlYesShareable link. When previewCurrent is false it may not show the new page for a moment.
previewCurrentNoWhether previewUrl already serves the new page. False means it is saved but the preview may lag a moment; editUrl shows it now. Absent on pages built by the older engine, which serve it at once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / brief / description
      Previous value: -"What the page should contain: its purpose, audience, sections, and call to action. The richer this is, the better the page."New value: +"What the page should contain: its purpose, audience, sections, and call to action. The richer this is, the better the page. Ignored when retrying a failed home page with slug \"index\": that rebuild reuses the page's original brief (use edit_page to change it)."
    • changedInput schema / properties / slug / description
      Previous value: -"URL slug, e.g. \"about\" or \"blog/launch\". Lowercase words and hyphens; may nest with \"/\". Derived from the title when omitted, and de-duplicated against existing pages. Use \"index\" for the home page: it is honoured only while the site has no home page, otherwise the call fails and you should pick another slug."New value: +"URL slug, e.g. \"about\" or \"blog/launch\". Lowercase words and hyphens; may nest with \"/\". Derived from the title when omitted, and de-duplicated against existing pages. Use \"index\" for the home page: it is honoured only while the site has no home page (or, on a site built with the html/v2 page engine, to retry a home page whose build failed); otherwise the call fails and you should edit the existing page instead."
    • changedInput schema / properties / title / description
      Previous value: -"Page title, e.g. \"About us\". Shown in the dashboard."New value: +"Page title, e.g. \"About us\". Shown in the dashboard. A home page retry keeps the page's original name, and the result reports that."
    • addedOutput schema / properties / previewCurrent
      Added value: +{
      +  "description": "Whether previewUrl already serves the new page. False means it is saved but the preview may lag a moment; editUrl shows it now. Absent on pages built by the older engine, which serve it at once.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / previewUrl / description
      Previous value: -"Shareable link that works immediately."New value: +"Shareable link. When previewCurrent is false it may not show the new page for a moment."
  2. Changed3 schema fields changed
    • changedInput schema / properties / slug / description
      Previous value: -"URL slug, e.g. \"about\" or \"blog/launch\". Lowercase words and hyphens; may nest with \"/\". Use \"index\" for the home page. Derived from the title when omitted, and de-duplicated against existing pages either way."New value: +"URL slug, e.g. \"about\" or \"blog/launch\". Lowercase words and hyphens; may nest with \"/\". Derived from the title when omitted, and de-duplicated against existing pages. Use \"index\" for the home page: it is honoured only while the site has no home page, otherwise the call fails and you should pick another slug."
    • addedOutput schema / properties / status / description
      Added value: +"The home page (slug \"index\") starts published, so publishing the site includes it; other pages start as drafts. Neither means the site is live."
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "draft"
      -]New value: +[
      +  "draft",
      +  "published"
      +]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, so the description carries the meaningful burden: the page is saved as a draft, the home page is created in published state, and the site itself is NOT published by this call. It also discloses inheritance behavior (brand, domain, shared header/footer/theme), which the agent cannot infer from annotations.

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 action and draft state, followed by the sibling routing and the home-page ordering rule. The "index"/home-page concept is explained across two clauses, a mild redundancy, but every sentence otherwise adds 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?

For a mutating tool with an output schema and full schema descriptions, the remaining unknowns an agent needs are side effects and state changes, which are all covered (draft vs published home page, site not published, inheritance). Nothing required for correct invocation is missing.

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 explains slug, brief, title and siteId in detail, including the "index" home-page rule. The description mostly restates the slug "index" semantics rather than adding new parameter meaning, so baseline 3 applies; ordering context is the only marginal addition.

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 ("Generate a new page inside an existing website and save it as a draft") and immediately distinguishes itself from the sibling create_page by scope (page belongs to a site). An agent can route correctly 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 names the alternative ("Use this rather than create_page whenever the page belongs to a site") and gives an ordering rule for new sites: add the home page (slug "index") first because later pages reuse its header/footer/theme. It also points to list_sites for obtaining a siteId.

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