Skip to main content
Glama

Publish a draft

publish_draft
Destructive

Makes a draft live: commits every change the draft holds (the files sync_files sent, and its deletions) as ONE commit on the app's source and starts a build, the same as the Save button in the dashboard. No file is sent again, so what the user saw at dev_url is exactly what is committed. Pass intent as a Conventional Commits subject that describes the whole change; it is the commit message in the timeline. It works on a running draft, and on the changes kept from a draft that stopped by itself. Returns what deploy_files returns (commit_sha, job_id, deploy_url, canonical_host, is_canonical, public): the build still has to be followed with get_build_status. The draft keeps running, with nothing left unsaved. Refused when the draft holds no change, and on a project whose owner approves each deploy (use deploy_files there). Requires a read-write token.

Input Schema

NameRequiredDescriptionDefault
intentNocommit subject shown in the timeline, Conventional Commits style, describing the whole change the draft holds, e.g. 'feat(home): new hero and footer'
project_idYesthe managed project id (from list_projects)

Output Schema

NameRequiredDescriptionDefault
filesNo
job_idNo
noticeNo
publicYes
statusNopresent, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first
messageYes
plan_idNopoll get_plan_status with this id for the eventual outcome
frameworkNo
approve_atNothe kad.dev dashboard URL a human approves or rejects this plan from
attempt_idNo
commit_shaYes
deploy_urlNo
expires_atNo
project_idYes
managed_envNo
expires_in_sNothe plan can no longer be approved after this many seconds
is_canonicalYes
canonical_hostNo
managed_resourcesNo
build_log_stream_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that files are not re-sent, the draft keeps running afterwards, the build must be followed with get_build_status, refusal conditions, and the read-write token requirement. The mutation and irreversibility implied by destructiveHint=true is contextualized rather than merely repeated.

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 ('Makes a draft live') before the details. The dense paragraph is long but nearly every clause carries operational information; a little tightening of the return-value list would help.

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?

Covers the mutation semantics, prerequisites, refusal cases, post-call follow-up, and token requirements, and even summarizes the return payload despite an output schema existing. Nothing needed to invoke it correctly is missing.

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%, so the schema already documents both parameters, but the description adds real meaning: 'intent' becomes the commit subject in the timeline and must describe the whole change in Conventional Commits style. This supplements rather than duplicates the schema.

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?

Names the specific verb and resource (publish a draft) and explains exactly what that means: committing all draft changes as one commit and starting a build. It explicitly distinguishes itself from deploy_files and sync_files, so an agent can route correctly 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 Guidelines5/5

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

States the conditions for use (draft running, or changes kept from a self-stopped draft), the refusals (no changes held, owner-approval projects), and names the alternative (deploy_files) for that excluded case. Both when-to-use and when-not-to-use are explicit.

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