Skip to main content
Glama

Save agent draft

save_agent_draft
DestructiveIdempotent

Save a draft (concept) for a voice agent - a full, validated snapshot of its configuration that is stored but not deployed anywhere. Never changes the running agent; only publish_agent_draft does. For an immediate live change use update_agent. draft must be the COMPLETE snapshot every time (name, language, systemPrompt and provider are required; firstMessage, voiceId, numberE164, transferTo, transferCondition, dataFields, toolIds, recordCalls, recordingNotice, goal, knowledge, notifyEmail, voicemail, silencePromptSecs, laughter, firstMessageProtectSecs, silencePromptText, inboundVariables, sttLanguageHintsStrict, turnDigitTailFloorMs, turnLongSpeechFloorMs, turnLongSpeechSecs, missedCallSms, workflow are optional; workflow has the same shape as update_agent's workflow field). Twelve fields break "complete every time" by carrying meaning in their own absence: recordingNotice, where absent means unchanged, not off; silencePromptSecs, where absent means unchanged, not disabled and not 10 - it is stored the same way for either provider, heard only once the agent runs on the volai engine; laughter, where absent means unchanged, not auto; firstMessageProtectSecs, where absent means unchanged, not disabled (null turns it off); silencePromptText, where absent means unchanged, not the default text (null restores it); inboundVariables, where absent means unchanged, not none (null or {} removes the inbound defaults, an object replaces them entirely); sttLanguageHintsStrict, where absent means unchanged, not off (true turns the strict language lock for speech recognition on, false or null turns it off; engine only, best effort, cs agents with outbound calls, never sk); turnDigitTailFloorMs, turnLongSpeechFloorMs and turnLongSpeechSecs, where absent means unchanged, not the engine default (null restores the engine default of 0, 0 and 5; a number sets the silence floor for dictated digits, the floor after long speech and its speech-length threshold, engine only); missedCallSms, where absent means unchanged, not off (send { enabled: false } to turn it off); and numberE164, where absent leaves the agent's current number untouched, null disconnects it, and a string attaches that number - the same three-state rule PATCH /v1/agents already uses for this field. Sending the number the agent already has live counts the same as leaving numberE164 absent, not as a choice - but that check is re-evaluated on every get_agent_draft read against whatever number is live at that moment, so it is not a stored decision: if the number later moves to another agent outside this draft, the same value you sent becomes an explicit choice again, and the next publish_agent_draft reattaches it here - surfaced as a number_changed_by_publish warning (see publish_agent_draft), not done silently. Re-read the draft with get_agent_draft right before publishing and compare numberE164 to the agent's current live number if that matters to you. The phase graph in workflow is only checked for its JSON shape here; its rules (reachable phases, known tools, per-phase limits) are checked at publish_agent_draft and at PATCH /v1/agents/{id}, so a draft saves even with a graph that publishing later rejects with invalid_workflow - read the current one from get_agent_draft, change only what you want, and send the whole object back; an unknown field is rejected. provider must equal the agent's actual provider (engine or elevenlabs) - a draft cannot change it. voicemail is only meaningful when provider is engine; publishing it on an elevenlabs agent fails with voicemail_requires_engine. toolIds and dataFields allow at most 10 entries each. expectedRevision must equal the revision from get_agent_draft; if someone else (typically a human in the volai portal) saved a newer draft in the meantime, this fails and you must reload with get_agent_draft. Same data as PUT /v1/agents/{id}/draft (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>",
      "draft": "<draft>"
    },
    "name": "save_agent_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of the agent whose draft to save, from list_agents. Looks like ag_9f3a2b7c4d1e.
draftYesComplete draft snapshot; send the whole object back every time, unknown fields are rejected. Read the current one with get_agent_draft.
expectedRevisionYesRevision of the draft as returned by get_agent_draft. The save 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.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description adds substantial context beyond them: full-snapshot replacement semantics, the expectedRevision concurrency conflict, provider immutability, deferred workflow validation (saves now, fails at publish with invalid_workflow), the 10-entry caps, and the number_changed_by_publish warning. It also discloses the surprising non-obvious behavior that absence means "unchanged" for twelve specific fields rather than a default.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The draft-versus-live distinction is correctly front-loaded, but the body is one monolithic paragraph that enumerates all twelve absence-sensitive fields and then re-sends several of them (numberE164, silencePromptSecs, sttLanguageHintsStrict) in separate later passages. Some of that is necessary warning, but a structured list would cut real redundancy without losing signal.

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 3-parameter mutation with nested objects and no output schema, the description covers everything an agent needs: required vs optional fields, absence vs null semantics, conflict recovery, ordering relative to publish, and the openapi.json reference for the response shape. Nothing material is left to inference.

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 carries field-level meaning, and some description text duplicates it verbatim (e.g. silencePromptSecs "not disabled and not 10"). Where it genuinely adds value is the cross-field reasoning the schema cannot express: the three-state numberE164 rule and its re-evaluation on every read, expectedRevision conflict handling, and the draft-saves-but-publish-rejects workflow split.

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?

States a specific verb and resource ("Save a draft (concept) for a voice agent") and immediately bounds the scope: "a full, validated snapshot ... stored but not deployed anywhere. Never changes the running agent." It names the siblings that do the adjacent jobs — publish_agent_draft for live changes and update_agent for immediate live edits — so the agent can separate the three without opening any 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?

Gives explicit when-to-use routing: use this to persist a concept, publish_agent_draft to deploy, update_agent for an immediate live change, and get_agent_draft to reload. It also states a procedural precondition ("Re-read the draft with get_agent_draft right before publishing and compare numberE164") and the failure recovery path for stale revisions ("reload with get_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.