Skip to main content
Glama

Publish pages

publish_pages
Destructive

Use this tool when the user asks to publish several pages at once: 「全部公開して」「このガイドページをまとめて公開して」, "publish these 20 pages", "make the new FAQ pages live" (ページの一括公開, ホームページ, Webサイト, ランディングページ).

Publishes the latest saved version of each page (siteIds, up to 10 per call) at its live URL, in two calls:

  1. dryRun: true publishes nothing. Per page it gives the live URL, the publish check's warnings, and a status: ready, already_live, or blocked (with the reason). headroom has the plan's room left, and confirmToken works for these same pages for a short time (until expiresAt).

  2. The real call takes the same siteIds and that confirmToken; without a valid token nothing is published (confirm_token_required, confirm_token_invalid), and a page saved after the dry run refuses the token (pages_changed): run the dry run again and show the user what changed. It is the step for after the user has seen the dry run and asked to publish. Per page the status is published, already_live, failed (with the reason), or limit_reached: a plan limit stopped the batch there, and the pages before it are live. summary counts each status. Like publish_site in production, the real call changes what anyone on the internet sees. idempotencyKey: a new id per batch; the same call sent again with the same key and token, after a timeout, returns the batch already run. A bigger job runs as several calls of up to 10 pages each, each with its own dry run. Every answer names the workspace (brand.id, name, host); with expectedBrandId, a connection that now works on another workspace changes nothing (brand_mismatch).

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": {
      "siteIds": "<siteIds>"
    },
    "name": "publish_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNotrue: check the pages and get a confirmToken; nothing is published
siteIdsYesThe pages' ids (get_brand or list_pages)
confirmTokenNoThe confirmToken from a dry run of the same siteIds; the real call needs it
idempotencyKeyNoA new id for this batch, such as a UUID; the same one again only to retry
expectedBrandIdNoThe workspace's id from get_brand. When the connection now works on another workspace (the dashboard's active workspace was switched), the call changes nothing and answers brand_mismatch.

Output Schema

NameRequiredDescriptionDefault
brandYes
pagesYes
dryRunYes
summaryYes
guidanceNo
expiresAtNo
confirmTokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedBrandId / description
      Previous value: -"The brand's id from get_brand. When the connection now works on another brand (the dashboard's active workspace was switched), the call changes nothing and answers brand_mismatch."New value: +"The workspace's id from get_brand. When the connection now works on another workspace (the dashboard's active workspace was switched), the call changes nothing and answers brand_mismatch."
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructive=true and openWorld=true, so the bar is lower, but the description adds substantial context: dryRun publishes nothing and returns per-page ready/already_live/blocked plus headroom and an expiring confirmToken; the real call fails with confirm_token_required/confirm_token_invalid and rejects pages_changed; limit_reached can stop a batch mid-way with earlier pages already live. The only gap is that it does not describe rate limits or authentication prerequisites beyond the token.

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 trigger, then organized into numbered steps for the dry run and the real call, so an agent can find the flow quickly. It is dense and long, with some repetition (the limit of 10 pages appears twice, and the idempotency/retry sentence is packed into the second block), but almost every sentence carries operational 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 destructive, token-gated batch mutation, the description covers the full lifecycle: check, confirm, partial-failure states, retry-after-timeout semantics, and workspace mismatch. An output schema exists, yet the description still gives enough status vocabulary (ready, already_live, blocked, published, failed, limit_reached) for the agent to reason about results and report them.

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, and the description goes further by linking the parameters: the confirmToken is scoped to 'these same pages' until expiresAt, idempotencyKey must be a new id per batch and reused only to retry, and expectedBrandId produces brand_mismatch when the active workspace changed. This adds workflow meaning the schema's per-field text does not convey on its own.

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 (publish the latest saved version of each page at its live URL) plus scope (siteIds, up to 10 per call), which separates it from the single-page sibling publish_site by name. The two-call dryRun/confirm structure is stated up front rather than buried.

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?

Opens with an explicit trigger ('when the user asks to publish several pages at once') and gives concrete user utterances in both Japanese and English. It also routes the second step ('the step for after the user has seen the dry run and asked to publish') and says a bigger job becomes several calls of up to 10 pages, each with its own dry run.

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.