Skip to main content
Glama

Huddle

publish_draft

Idempotent

Publish the open draft as the document's next revision. Use it after save_draft, when the text is ready for everyone. Returns the document's id, title and new revision number, or a refusal with the reason when somebody else published first, the draft differs from the body you send, or there is nothing new to 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": {
      "id": "<id>",
      "expect_revision": "<expect_revision>",
      "expect_draft_version": "<expect_draft_version>",
      "body": "<body>"
    },
    "name": "publish_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesthe document id, from list_docs or search_docs
bodyYesthe exact text you mean to publish; it must equal the saved draft
expect_revisionYesthe number of the revision you edited against, from get_doc; 0 when nothing is published
expect_draft_versionYesthe draft_version your last save returned

Output Schema

NameRequiredDescriptionDefault
idYesThe document id.
titleYesIts title.
revisionsYesIts revision count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (which only declare that this is a non-read-only, idempotent, closed-world operation), the description discloses the optimistic-concurrency model: a refusal when someone else published first, when the body diverges from the saved draft, or when there is nothing new. This is genuinely useful failure-mode context, though it does not address permissions or whether a publication can be reversed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the action and followed by sequencing, then failure conditions. Every clause carries operational meaning; there is no restatement of the name or filler.

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 four-parameter mutation with a guard-based refusal path, the description covers action, sequencing, and failure modes, and an output schema already exists for the return values it mentions. Nothing an agent needs in order to call this correctly is missing.

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 100%, so all four parameters are already documented in the schema, including that body must equal the saved draft. The description reinforces the coupling between body and the draft and the conflict role of expect_revision, but adds no syntax or format detail beyond what the schema states, so the baseline of 3 applies.

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 states a specific verb and resource ('publish the open draft as the document's next revision'), which cleanly distinguishes it from save_draft and discard_draft in the sibling list. An agent can identify the operation 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 Guidelines4/5

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

It gives an explicit ordering cue ('use it after save_draft') and a readiness condition ('when the text is ready for everyone'), which is clear contextual guidance. It stops short of naming a when-not alternative such as discard_draft, but the refusal conditions implicitly define the cases where publishing will not succeed.

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