Roll back agent draft
rollback_agent_draftRestore a previously PUBLISHED revision (from get_agent_draft's history array) as both the new draft AND the live agent - this reaches the provider (ElevenLabs or the volai engine) and phone routing, same as publish_agent_draft. expectedRevision must equal the current draft revision; invalid_draft means targetRevision is no longer stored (history is limited). If the provider fails or times out in a way we cannot confirm, this returns operation_uncertain and the agent stays locked - it is NOT rolled back automatically. After a timeout call get_agent_draft first and check operation; never re-call rollback_agent_draft blindly - use reconcile_agent_draft_operation or REST POST /v1/agents/{id}/draft/operation once a human has confirmed the live state. On success the response may carry a warnings field (structuredContent.warnings, same codes as update_agent), since the restored revision's first line is republished live - and, when the rollback actually changes the agent's live phone number, per numberE164's three-state rule (see save_agent_draft - a revision with no numberE164 key leaves the number untouched and never triggers this), also number_changed_by_publish with from and to (see publish_agent_draft); this never blocks the rollback. Same data as POST /v1/agents/{id}/draft/rollback (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>",
"targetRevision": "<targetRevision>"
},
"name": "rollback_agent_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the agent whose draft to roll back, from list_agents. Looks like ag_9f3a2b7c4d1e. | |
| targetRevision | Yes | Revision to restore, from the history array returned by get_agent_draft (past published revisions still retained). invalid_draft when it is no longer stored. | |
| expectedRevision | Yes | Revision of the draft as returned by get_agent_draft. The rollback is rejected with revision_conflict when it changed since - reload with get_agent_draft. |