Skip to main content
Glama

Pagetool

Add or update a form on a site

upsert_site_form

Declares a built-in form on a site you own: its fields (text, email, textarea, checkbox, month, date, tel, select), the recipient email (kept on the server, never in the page), the button label and the thank-you message. Entries are saved and emailed from Pagetool, behind Turnstile, a honeypot, a minimum fill time, rate limits and field validation. Returns form_key and placeholder_html: put placeholder_html in the page HTML where the form should appear (replace_page_html, or stage then publish_staged). Pass form_key to update an existing form. For any date or month question use a month/date field here (past dates are never offered, and recurring events via occurs drop off once they pass) rather than a raw in page HTML, which the server cannot check. 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": {
      "site_key": "<site_key>",
      "name": "<name>",
      "recipient_email": "<recipient_email>",
      "fields": "<fields>"
    },
    "name": "upsert_site_form"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe form's name, used in the notification subject "<Site name>: new <name>", e.g. "Open mic sign-up". 1-120 characters.
stageNotrue = stage this form change with the page: visitors keep the live form until publish_staged (discard_staged drops it); preview at staged_preview_url. The operator token always stages on a published site. Omit for an immediately live change.
fieldsYes1-20 fields, in display order.
classesNoOptional Tailwind/CSS class strings to style the form to match the page.
form_keyNoOmit to create a new form; pass an existing form_key (from a previous call) to update that form.
site_keyYesThe site the form belongs to. Must be yours.
submit_labelNoButton text. Default "Send". Max 60.
recipient_emailYesWhere entries are emailed. Stored on the server only; never appears in the page.
success_messageNoShown after a successful entry. Default "Thanks! Your entry was sent." Max 300. May include {field_name} for a text, select, email or tel field, e.g. "Thanks, {name}!"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false). The description adds substantial context beyond that: entries are stored and emailed by Pagetool, protected by Turnstile, honeypot, minimum fill time, rate limits and field validation, and the recipient email never appears in the page. It also discloses the return values (form_key, placeholder_html) and that the tool is free.

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 core action and the return-value instruction, and every sentence carries information. It is dense and slightly long, but no sentence is filler; the date/month caveat is the only part that could be tightened.

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 9-parameter mutation tool with no output schema, the description covers what the tool does, how to place the result, how to update, and what protections apply. Nothing an agent needs to call it correctly is missing.

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. The description still adds meaning beyond the schema by enumerating the supported field types (text, email, textarea, checkbox, month, date, tel, select) and reinforcing that recipient_email is server-side only and that form_key selects update mode.

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 ('Declares a built-in form on a site you own') and immediately clarifies the upsert semantics via 'Pass form_key to update an existing form.' An agent can distinguish this from replace_page_html or publish_staged 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 routes the agent: use placeholder_html with replace_page_html or stage-then-publish_staged, and use a month/date field here rather than a raw <input type="date"> because the server cannot validate the latter. It also names the create-vs-update condition (omit vs pass form_key).

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