Skip to main content
Glama

Publish the saved preview

publish_draft
Idempotent

Publishes the exact saved preview for a user-authorized draft after revalidating content, images, accounts, and limits; any edits require a new preview.

Instructions

Use only for user-authorized publication. Publish exactly the saved preview identified by draftId, expectedRevision and previewId. Content/images/accounts/limits are revalidated; edits require a new preview. Preserve requestId on every retry. Published includes receipts; uncertain results become NeedsReview (never retry). Failed means nothing was sent (or the rest of a thread): retrying with the same requestId continues it. Never bypass this with publish_post.

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": {
      "draftId": "<draftId>",
      "expectedRevision": "<expectedRevision>",
      "previewId": "<previewId>",
      "requestId": "<requestId>"
    },
    "name": "publish_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftIdYes
previewIdYes
requestIdYesStable unique ID for this user-authorized action. Reuse it on retries; never change it to bypass an uncertain result.
expectedRevisionYes

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true): it discloses revalidation of content/images/accounts/limits, a three-way outcome taxonomy (Published includes receipts, NeedsReview must not be retried, Failed means nothing was sent and is safely retryable with the same requestId), and partial-thread semantics. That is exactly the safety-relevant behavior an agent needs for a real-world side-effecting publish.

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 precondition and the identity constraint, and no sentence is filler. The terse, telegraphic phrasing ('Failed means nothing was sent (or the rest of a thread)') is information-dense but takes a re-read, which slightly hurts scanability.

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 a complex, open-world, side-effecting publish tool with a low-coverage input schema, the description covers retry, failure, and uncertainty handling thoroughly, and an output schema exists so return shape needn't be explained. The only material omission is how to supply expectedRevision, which is central to getting a first call right.

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 description coverage is only 25% (only requestId is documented in the schema), so the description must compensate, and it largely does: it ties draftId, expectedRevision and previewId to a specific saved preview, states that edits invalidate the preview, and reinforces requestId stability on retries. The remaining gap is that it never says what expectedRevision actually is (the draft revision the preview was generated from) or where to obtain its value, leaving the agent to infer it.

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 exactly the saved preview identified by draftId, expectedRevision and previewId. It is clearly distinguished from preview_draft (generate the preview) and from publish_post (explicitly named as forbidden). An agent can tell which of the sibling publish paths applies 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit gating precondition ('Use only for user-authorized publication'), an explicit exclusion ('Never bypass this with publish_post'), and a routing rule for the edit case ('edits require a new preview'), which points the agent back to preview_draft. When-to-use, when-not-to-use, and the alternative are all present.

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