Publish agent draft
publish_agent_draftPublish 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the agent whose draft to publish, from list_agents. Looks like ag_9f3a2b7c4d1e. | |
| expectedRevision | Yes | Revision 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. |