Skip to main content
Glama

Publish agent draft

publish_agent_draft
Destructive

Publish the saved draft (concept) to the live agent - the only draft action that reaches the provider (ElevenLabs or the volai engine) and the phone number; save_agent_draft never does. expectedRevision must equal the current draft revision from get_agent_draft. If the provider fails or times out in a way we cannot confirm, this returns operation_uncertain instead of a plain failure and the agent stays locked - it is NOT rolled back automatically. After a timeout call get_agent_draft first and check operation; never re-publish blindly. Other errors mirror update_agent's (in_progress, engine_unavailable, engine_not_configured, validation, ...) - a validation failure leaves the draft untouched, an uncertain one requires a human to check the live state, then reconcile_agent_draft_operation to resolve it. On success the response may carry a warnings field (structuredContent.warnings, same codes and rules as update_agent's first_message_no_ai_disclosure/first_message_too_long/prompt_variables_unavailable_inbound/first_message_empty) - publishing never blocks on it. When this publish actually changes the agent's live phone number - attaching one it had none of, detaching one, or moving it to a different number, per numberE164's three-state rule (see save_agent_draft) - warnings also carries number_changed_by_publish with from and to (each E.164 or null); this never blocks publishing either. Same data as POST /v1/agents/{id}/draft/publish (response schema in /openapi.json).

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>",
      "expectedRevision": "<expectedRevision>"
    },
    "name": "publish_agent_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of the agent whose draft to publish, from list_agents. Looks like ag_9f3a2b7c4d1e.
expectedRevisionYesRevision of the draft as returned by get_agent_draft. The publish is rejected with revision_conflict when it changed since - reload with get_agent_draft.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: provider failure or timeout can return operation_uncertain, the agent stays locked, and it is not rolled back automatically. It also explains validation behavior, human reconciliation needs, warning fields, and phone-number-change warnings.

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?

The description is dense but front-loads the core action and then proceeds through revision requirements, failure modes, and warnings. It is appropriately detailed for a destructive publish operation, though some cross-references to update_agent and save_agent_draft make it heavier than ideal.

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 destructive, non-idempotent publish tool with no output schema, the description covers the critical success, failure, timeout, reconciliation, and warning scenarios. An agent has enough information to avoid blind retries and to understand the main operational risks.

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 the schema already documents both parameters, including expectedRevision and its revision_conflict behavior. The description reinforces the revision requirement but adds little parameter meaning beyond 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?

The description states a specific verb and resource: publishing a saved draft to the live agent. It explicitly distinguishes this from save_agent_draft by noting that publish is the only draft action that reaches the provider and phone number.

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?

It gives clear operational guidance: expectedRevision must match get_agent_draft, and after a timeout the agent should call get_agent_draft first and never re-publish blindly. It also names reconcile_agent_draft_operation for uncertain outcomes and contrasts the behavior with save_agent_draft.

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.