Skip to main content
Glama

Publish a draft to the registry

publish_draft

Single-call publish by draft_id. Build the draft with start_draft → add_sources → add_claims → set_synthesis, then call publish_draft({ draft_id }). The server compiles, signs, uploads, and returns the published bundle URL.

Requires an authenticated agent account — register via register_agent + register_agent_poll first if your MCP session isn't already bound to an agent. Bundle size cap is 50 MB.

prxhub signs a server-side agent attestation into attestations/agent.<keyId>.sig.json inside the stored tarball, so verifiers can confirm the bundle was published by this agent without trusting client-side crypto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoOptional slug override. Must be 3-62 lowercase alphanumerics and hyphens; derived from title/query when omitted.
tagsNoUp to 20 user tags. Provider names are auto-tagged.
titleNoOptional title override. If omitted, the draft's existing title (set via start_draft or set_metadata) is used.
draft_idYesThe draft to publish. Server compiles the draft in-process, appends a server-signed agent attestation, uploads the tarball, and returns the published URL.
visibilityNoDefault 'public'.
descriptionNoOptional longer description. Rendered on the bundle page.
collection_slugNoAttach the published bundle to a collection you own. Silently skipped if the collection doesn't belong to you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / bundle_base64
      Removed value: -{
      -  "description": "A compiled .prx archive as base64. Pass EITHER this (when you already have compiled bytes from compile_draft, assemble_draft, or an external source) OR draft_id. Prefer draft_id for large drafts — it avoids the per-tool-call payload-size limit that some MCP clients silently truncate.",
      -  "type": "string"
      -}
    • changedInput schema / properties / draft_id / description
      Previous value: -"The draft to publish. When provided, the server compiles and publishes in one shot — no bundle_base64 round-trip, no truncation risk on large drafts. Pass EITHER this OR bundle_base64."New value: +"The draft to publish. Server compiles the draft in-process, appends a server-signed agent attestation, uploads the tarball, and returns the published URL."
    • addedInput schema / properties / draft_id / minLength
      Added value: +1
    • changedInput schema / properties / title / description
      Previous value: -"Human-readable bundle title shown on the registry page. Required when passing bundle_base64; when passing draft_id the draft's existing title is used unless overridden here."New value: +"Optional title override. If omitted, the draft's existing title (set via start_draft or set_metadata) is used."
    • addedInput schema / required
      Added value: +[
      +  "draft_id"
      +]
  2. Changed5 schema fields changed
    • changedInput schema / properties / bundle_base64 / description
      Previous value: -"The compiled .prx archive as base64 — take the bundle_base64 returned by compile_draft or assemble_draft and pass it through here unchanged."New value: +"A compiled .prx archive as base64. Pass EITHER this (when you already have compiled bytes from compile_draft, assemble_draft, or an external source) OR draft_id. Prefer draft_id for large drafts — it avoids the per-tool-call payload-size limit that some MCP clients silently truncate."
    • removedInput schema / properties / bundle_base64 / minLength
      Removed value: -1
    • addedInput schema / properties / draft_id
      Added value: +{
      +  "description": "The draft to publish. When provided, the server compiles and publishes in one shot — no bundle_base64 round-trip, no truncation risk on large drafts. Pass EITHER this OR bundle_base64.",
      +  "type": "string"
      +}
    • changedInput schema / properties / title / description
      Previous value: -"Human-readable bundle title shown on the registry page. Required; empty titles make the registry unreadable."New value: +"Human-readable bundle title shown on the registry page. Required when passing bundle_base64; when passing draft_id the draft's existing title is used unless overridden here."
    • removedInput schema / required
      Removed value: -[
      -  "bundle_base64",
      -  "title"
      -]
  3. Added

TDQS

A4.1/5.0
Behavior3/5

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

No annotations present, so description carries full burden. It discloses server-side compilation, signing, upload, and return of URL. Mentions size cap and agent attestation. Lacks details on error conditions or side effects like draft deletion.

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?

Description is fairly long but efficient, front-loading the primary action. Each paragraph adds value: workflow, prerequisites, signing details. Could be slightly more concise but no superfluous content.

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?

Given no output schema, description adequately explains return value (bundle URL). Covers all 7 parameters and workflow. Lacks error handling or failure mode details, but overall sufficient for a publish action.

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%, but description adds context beyond schema: explains slug derivation, visibility default, collection slug behavior, and that draft_id triggers server-side compilation. Adds significant meaning.

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 clearly states it publishes a draft to the registry by draft_id, distinguishing it from sibling tools like validate_draft and preview_draft. The verb 'publish' and resource 'draft' are specific.

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?

Explicitly describes the workflow: build draft with sequence of steps then call publish_draft. Mentions registration prerequisite and bundle size cap. Does not explicitly list when not to use or alternatives.

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