Skip to main content
POST
Publish a tool's draft
  • Business accounts only, with tools:build. Only an Owner or Admin signed in to the Dashboard publishes it, never an API key or an agent.
  • Pomerado’s review reads the draft’s code first and refuses code that sends cookies, credentials or callers’ data off the tool’s website, logs a credential, or holds private data (draft_refused_by_review, with its reason and findings).
  • Send the digest of the draft you saw. It publishes once a run of the draft passed on the live version, for free, and the draft is then gone.
  • The draft’s files replace the live version’s, a repair’s included, with the inputs and outputs its run read. A public tool’s draft goes live only when it keeps every input callers send and holds no team member’s email address or name, or a credential.
  • environment publishes the draft in that environment as the tool’s newest version there alone. A public tool’s version there stays your team’s until you push it.
  • Callers: an API key, an MCP OAuth token or a Dashboard session.
  • Permission: tools:build.
  • Effect: Creates or changes something.
  • Errors: business_account_required, not_found, draft_changed, draft_not_run, draft_not_publishable, draft_changes_inputs, draft_holds_owner_data, draft_refused_by_review, draft_review_unavailable, environment_required, environment_not_found, and the errors any request can get.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

a tool ID: tool_ and 32 lowercase hex digits

Example:

"tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190"

Query Parameters

environment
string

On a Business team with environments: the key of the environment whose version and draft to use, such as staging. Left out, the environment your API key or MCP URL is for, else production

Body

application/json
digest
string
required

The draft's digest, as code.get answered it

Pattern: ^[0-9a-f]{64}$

Response

The tool's code, with the draft live

integration
object
required
tool
object
required
versions
object[]
required

The tool's versions, newest first, at most 100

files
object[]
required

The live version's files, by path

input_schema
object
required

What the live version's input takes, as JSON Schema

draft
object | null
required

Your team's draft of the tool, shared by every member, or null when it has none

repair
object | null
required

Pomerado's automatic repair of the tool while one is under way after a run of it failed, whoever ran it, or null when none is