Skip to main content
Glama

Pagetool

Add a page to a site

add_page

Adds a new page (e.g. "/about", "/contact") to an existing site, built from html (same importer as create_site_from_html) or composed from sections/content_json in the site's own palette and fonts. Link between pages with href="/about". Respects the plan's page limit; stage:true previews it before it goes live. Free.

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": {
      "path": "<path>"
    },
    "name": "add_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlNoBuild the page from this HTML (same importer as create_site_from_html). Omit to compose it from sections instead.
nameNoThe page name shown in the editor's page list. Defaults to one made from the path ("Contact Us").
pathYesThe new page's path, e.g. "/about" or "/contact": lowercase letters, digits and hyphens, at most 19 characters. Link to it with href="/about".
stageNotrue = work on a staged copy instead of the live site: preview it at staged_preview_url, then publish_staged or discard_staged. Omit for a normal (immediately live) edit.
sectionsNoComma-separated section kinds to compose the page from when html is omitted: hero, about, services, features, gallery, testimonials, pricing, faq, hours, contact, cta, footer, menu, map, social, header, products, reviews. Defaults to about.
site_keyNoThe site to add a page to. Defaults to the caller's current draft site when omitted.
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.
content_jsonNoPer-section content keyed by section kind, exactly as create_site_from_brief's content_json. Styled with the site's own palette and fonts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish this is a non-read-only, non-destructive, non-idempotent mutation, and the description adds real context beyond them: the plan's page limit is enforced and the operation is free. The staging branch explains what stage:true actually does to the live site, which is meaningful behavioral detail. It does not state what happens on a duplicate path, which matters given idempotentHint=false.

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?

A single front-loaded sentence with the verb, resource, and the two build modes up front, followed by the linking convention, plan limit, staging, and cost. It is dense but every clause carries information; the only cost is a slightly run-on structure that a second sentence could have broken up.

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?

For an 8-parameter creation tool with no output schema, the description covers the decisions an agent must make: which input mode, whether to stage, path formatting and cross-linking, and the plan limit. The remaining gap is failure behavior on an existing path and whether a preview/URL is returned, which the absence of an output schema leaves unaddressed.

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 every parameter including html, sections, content_json, site_key, and draft_token is already documented in the schema. The description reinforces the html-versus-sections choice and that pages inherit the site's palette and fonts, but adds no syntax or format detail the schema lacks. Baseline 3 applies when the schema carries the parameter burden.

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 opens with a specific verb and resource ("Adds a new page ... to an existing site") and immediately disambiguates the two construction paths: from html via the same importer as create_site_from_html, or composed from sections/content_json. An agent can distinguish this from create_site_from_html, replace_page_html, and add_section without opening a schema.

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 conditional guidance: use html or omit it and compose from sections, and use stage:true to preview versus omitting it for an immediately live edit, with publish_staged/discard_staged named as the follow-ups. What is missing is an explicit negative case, e.g. what to do if the path already exists or when to prefer replace_page_html instead.

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