Skip to main content
Glama

sb_publish

DestructiveIdempotent

Publish a draft page to live and report the revision that went live. Preview shared-section cascades with a dry run before shipping edits to other pages.

Instructions

Compile the draft into the live page, and report which revision went live (id, publishedAt, fromVersionId). PUBLISH CASCADES to every page sharing a changed global section or overlay; the dry run lists them (would_cascade) and warns FIRST when it would ship shared edits nobody published. verify:true then fetches the live page and says whether the origin is serving that revision yet — the storefront caches for 60s, so a reload showing the old page is that, not a failed publish.

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": {
      "page_id": "<page_id>"
    },
    "name": "sb_publish"
  }
}

Input Schema

NameRequiredDescriptionDefault
verifyNoFetch the live page afterwards and report whether it serves this revision
dry_runNo
page_idYes
site_idNo
publish_draftsNoAlso publish the pages listed as unpublished_drafts and first_publish

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.98.3
    • changedInput schema / properties / publish_drafts / description
      Previous value: -"Also publish every other page whose draft is ahead of its live copy (listed as unpublished_drafts)"New value: +"Also publish the pages listed as unpublished_drafts and first_publish"
  2. Changed1 schema field changedv0.69.0
    • addedInput schema / properties / publish_drafts
      Added value: +{
      +  "description": "Also publish every other page whose draft is ahead of its live copy (listed as unpublished_drafts)",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changedv0.63.0
    • addedInput schema / properties / verify
      Added value: +{
      +  "description": "Fetch the live page afterwards and report whether it serves this revision",
      +  "type": "boolean"
      +}
  4. Changed1 schema field changedv0.12.0
    • changedInput schema / required
      Previous value: -[
      -  "site_id",
      -  "page_id"
      -]New value: +[
      +  "page_id"
      +]
  5. First observedv0.1.4

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond annotations (destructive/idempotent/readOnly=false) by disclosing the cascade to pages sharing changed global sections, warning about shipping shared edits nobody published, and explaining the 60s storefront cache so an old page isn't mistaken for a failed publish. This is exactly the behavioral context an agent needs before a destructive write.

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-loads the core action and packs cascade/cache caveats into two dense sentences. Slightly parenthetical-heavy, but every clause carries operational value.

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?

With no output schema, the description supplies return-shape detail (id, publishedAt, fromVersionId, would_cascade) and the caching caveat, which is a lot for a destructive tool. Only the uncovered params (page_id, site_id, publish_drafts) keep it from full completeness.

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 only 40%, so the description must compensate. It richly explains dry_run and verify (beyond the schema), but page_id, site_id, and publish_drafts are not addressed in the description, leaving gaps in a 5-param tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: compile the draft into the live page, plus reports the resulting revision (id, publishedAt, fromVersionId). The operation is unmistakable. It does not explicitly distinguish itself from siblings like sb_page_version or sb_undo, which keeps it just shy of a 5.

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?

Gives clear operational context: dry_run lists would_cascade and warns FIRST, and verify:true is the follow-up confirmation step. This implies a sensible workflow without stating exclusions or naming an alternative tool directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.