Skip to main content
Glama

Create a voice agent

create_agent
Destructive

Create a voice agent that can make and take calls. Required fields are name and systemPrompt; optional fields configure its first line, language (cs, sk, en, de, pl, nl, pt, sl, ro, da, et, lv, bg, fi, el, fr, it, hu, lt, sv, hr, es, is, default cs), voice, number, webhook tools, human handoff, captured data, recording, goal, knowledge, e-mail summaries, voicemail handling, silencePromptSecs (a silence reminder, 3 to 25 seconds, default 10), firstMessageProtectSecs (keeps the first line from being interrupted by a short reaction, 0 to 20 seconds, outbound calls only, no default; a reply from the person who answered without an interrupting word (for example stop, no, wait) is dropped in that window: it does not interrupt the line, is not in the transcript and the agent does not react to it; the interrupting words follow the agent's language, so an English agent is interrupted by stop, no, wait or hold), silencePromptText (your own silence reminder sentence, up to 80 characters), inboundVariables (default values for {{variable}} placeholders on inbound calls, for example { uvod: 'How can I help you?' }; up to 10 keys, values up to 200 characters, names volai supplies itself such as caller_number or volai_* are rejected; not used on outbound calls, where the variables of make_call apply; works for either provider), sttLanguageHintsStrict (strict language lock for speech recognition on the volai engine, Soniox language_hints_strict: the transcript strongly prefers the agent's language, so a short Czech reply is not written as a foreign word or in another script; best effort, meant only for cs agents with outbound calls, never for sk; stored for either provider, read only by the engine), turnDigitTailFloorMs (silence floor in milliseconds the engine keeps after a reply that ends with 3 to 8 digits, so the agent does not jump into a number the caller dictates group by group; 0 turns it off, otherwise 400 to 2300, recommended first step 800 for Czech agents that take dictated numbers; no default, the engine default is 0), turnLongSpeechFloorMs (silence floor in milliseconds after the caller spoke longer than turnLongSpeechSecs; 0 turns it off, otherwise 400 to 2300, suggested 800; engine default 0) and turnLongSpeechSecs (speech length in seconds above which that floor applies, 1 to 30, engine default 5; all three are stored for either provider and used only by the engine; Czech agents on the default end-of-turn profile already require 300 ms of silence before a turn ends (100 ms less than the engine default 400), so a floor of 400 already adds 100 ms for them), a missed-call SMS to the caller (missedCallSms) and phases (workflow). useForOutboundTasks: true requests the volai engine, false starts on ElevenLabs, and omission follows the deployment default. A non-empty transferTo then attempts to switch a finished ElevenLabs agent to the engine, even after false; the agent can remain on ElevenLabs when that switch is paused, unavailable or fails, so inspect the returned provider before planning a task or relying on handoff. Since voiceId is chosen before creation returns, omit it when the final provider is uncertain, then set a supported voice with update_agent after inspecting provider. With explicit true, a recognized catalog voice that is unavailable on the engine, including anet, is replaced by the engine's default voice for the selected language. Outside that fallback, an engine agent accepts catalog voices except an ElevenLabs voice ('katty', 'anet') or a raw ElevenLabs voice id, and an incompatible voiceId is rejected with a 400. An ElevenLabs agent accepts katty and a raw ElevenLabs voice id ('anet' is retired - ElevenLabs no longer assigns it to new agents); use list_voices with provider: 'elevenlabs' to see its catalog. Explicit true fails with engine_not_configured when the engine is unavailable. If engine setup fails after the underlying agent was created, engine_setup_incomplete is returned; do not retry creation. Find the agent by name with list_agents, inspect its provider, then finish it in the Agents portal or contact support; update_agent cannot select a provider. The transferred leg is billed as a regular outbound call. recordCalls defaults to true; the first line gets a short recording notice only with recordingNotice: true (off by default, plays only while recordCalls is on), and the customer remains responsible for legal disclosure. A firstMessage without digital-assistant disclosure still saves the agent and returns first_message_no_ai_disclosure in warnings. Voicemail is accepted only when the initial provider selection is the engine: explicit true, or omission while the engine is the deployment default. Explicit false with transferTo still rejects voicemail before the later switch attempt. A firstMessage estimated to take over 7 seconds to say - measured against what the caller actually hears, the greeting plus the short recording-notice sentence added when recordingNotice and recordCalls are on (about 2.53 words per second; digits always, and all-caps abbreviations up to four characters, count per character) - also gets a warnings field, code first_message_too_long; an unchanged default opening line never triggers it, only one you have edited. Keep the greeting to a name, company, a short AI notice, and a question. Once the agent has a phone number, a systemPrompt or firstMessage variable outside the set an inbound call actually supplies gets prompt_variables_unavailable_inbound in warnings, and a firstMessage with no letter or digit left in it outside the variables once every variable block is removed gets first_message_empty - see /docs/mcp for both. A node in workflow is a SCOPE, not a script: it only adds a prompt, knowledge and tools that apply while the call is in it, plus an optional line spoken once on entry - it never dictates exact wording or forces a fixed order of questions. The model itself decides when to move between nodes by calling a tool; each edge's condition must describe what the CALLER said, never what the agent or a tool did. Limits: 2 to 8 nodes, 1 to 24 edges, at most 5 edges leaving one node, a condition 5 to 200 characters long, a node's prompt up to 2000 characters and knowledge up to 4000, with prompt plus knowledge together capped at 4000 per node. There is no end-of-call node - a call still ends only through the built-in end behaviour. Example (a funeral home receptionist): a triage node whose edges route to bereavement, burial or inquiry based on what the caller asked for. An invalid workflow (unreachable node, entry pointing nowhere, a reserved tool name...) fails the whole request with invalid_workflow; a valid one that could still be improved (a dead-end node, a phase with no enter line...) instead comes back in warnings - see /docs/mcp for the full list of codes and /docs/api Call phases section for the JSON shape. With a calls and SMS number as numberE164 the agent must run on volai's own voice engine and its transferTo, if any, must be a Czech (+420) number (unsupported_for_number_type, destination_not_allowed), and the number must be active (invalid_transition, 409); if that number is being processed by another operation (an activation, billing or a release) the call returns in_progress (409), and if the engine does not answer while the number is attached it returns engine_unavailable or engine_readback_mismatch (502): in all of these the agent was not created, try again in a minute. Same data as POST /v1/agents (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": {
      "name": "<name>",
      "systemPrompt": "<systemPrompt>"
    },
    "name": "create_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoOne sentence describing what a successful call looks like, used by an automated judge after the call to score it met or not met, up to 300 characters.
nameYesDisplay name of the agent, shown in the portal and in list_agents, 1 to 60 characters.
toolIdsNoIds of webhook tools from list_tools the agent may call during a call, at most 10; the tool must already exist on the account.
voiceIdNoVoice id from list_voices. true maps an incompatible catalog voice such as katty to the engine default; omission with the engine default rejects it. false accepts katty or a raw ElevenLabs id; anet is retired for new agents. Omit when transferTo makes provider uncertain.
calendarNoCalendar availability rules so the agent can check availability and book appointments during a call, on volai's own voice engine only. Effective once provider is engine - see calendar_pending_engine_switch in warnings otherwise.
languageNoLanguage the agent speaks, one of: cs, sk, en, de, pl, nl, pt, sl, ro, da, et, lv, bg, fi, el, fr, it, hu, lt, sv, hr, es, is. Defaults to cs.
laughterNoWhether the agent may laugh during calls: auto follows sensitive-topic detection, on overrides that detection, off always suppresses it. Takes effect from the next call, only heard for a Cartesia voice in Czech on the engine, which on does not override. Omit for auto.
workflowNoSplit the call into phases (nodes). Optional; a single phase, as before, when absent. Each node adds a prompt, knowledge and tools addition plus an optional entry line; edges are model-triggered transitions on what the caller said. See /docs/api Call phases section.
knowledgeNoExtra text the agent knows besides its instructions, such as a price list or FAQ, appended to the end of the prompt, up to 20000 characters.
voicemailNoVoicemail detection on outbound calls. Accepted only when the initial selection is the engine: true, or omitted with an engine deployment default. false fails even with transferTo because validation runs before the later switch attempt.
dataFieldsNoWhat the agent should record from the call, at most 10 fields; the result shows up in the data field of get_call.
numberE164NoPhone number to attach to the new agent right away, in E.164 format with the country code, for example +420123456789, from list_numbers. Omit to create the agent without a number.
transferToNoE.164 number the agent transfers the caller to when they ask for a human. Must not be your own volai number - the call would loop back on itself.
notifyEmailNoWhether to email the account owner a summary after every call this agent takes. Defaults to true.
recordCallsNoWhether to record calls for this agent. Defaults to true. Recording adds no notice to the first line by itself; see recordingNotice.
firstMessageNoOpening line the agent speaks first, before the caller says anything. Omit to use a default opening line.
systemPromptYesFull instructions the agent follows during the call, 10 to 6000 characters.
missedCallSmsNoSend an SMS to the caller when this agent misses the call. Omit for off.
recordingNoticeNoWhether the agent ends its first line with a short sentence saying the call is recorded, in the agent's language. Plays only while recordCalls is on. Defaults to off.
inboundVariablesNoDefault values for {{variable}} placeholders on inbound calls, for example { uvod: 'How can I help you?' }: up to 10 keys of letters, digits or underscores, values up to 200 characters. Names volai supplies itself (caller_number, volai_*, system__*) are rejected. Omit for none.
silencePromptSecsNoHow many seconds of caller silence trigger a "Are you there?" reminder prompt, 3 to 25. null turns it off. Defaults to 10 when omitted. Stored the same way for either provider, but only heard once the agent runs on the volai engine (provider engine).
silencePromptTextNoYour own silence reminder sentence, up to 80 characters, spoken word for word instead of the default reminder for the agent's language. End it with a question mark. null or an empty string keeps the default. Stored for either provider, heard only on the volai engine.
transferConditionNoWhen to transfer to a human, one or two sentences as an instruction to the model, up to 500 characters.
turnLongSpeechSecsNoSpeech length in seconds above which turnLongSpeechFloorMs applies, 1 to 30, decimals allowed; no effect while that floor is 0. Omit for the engine default (5).
inboundFirstMessageNoOrdinary inbound opening line on the volai engine. Verified callback greetings take precedence. null or an empty string restores the normal opening line.
useForOutboundTasksNoInitial provider: true requests engine; false ElevenLabs (warns elevenlabs_by_explicit_choice if the language defaults to engine); omission uses deployment settings and enabled languages. Language alone does not guarantee engine. transferTo may then switch it; read provider.
turnDigitTailFloorMsNoSilence floor in ms after a reply ending with 3 to 8 digits (a dictated number): 0 turns it off, otherwise 400 to 2300, recommended first step 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0).
turnLongSpeechFloorMsNoSilence floor in ms after the caller spoke longer than turnLongSpeechSecs: 0 turns it off, otherwise 400 to 2300, suggested 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0).
sttLanguageHintsStrictNoStrict language lock for speech recognition on the volai engine (Soniox language_hints_strict): the transcript strongly prefers the agent's language. Best effort; only for cs agents with outbound calls, never for sk. ElevenLabs ignores it. Omit for off.
firstMessageProtectSecsNoSeconds of the first line protected from interruption, 0 to 20, outbound calls only. A reply with no interrupting word (for example stop, no, wait; language-specific) is dropped: not in the transcript, no agent reaction. null or 0 turns it off. Heard only on the volai engine.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / turnDigitTailFloorMs / description
      Previous value: -"Silence floor in ms after a reply ending with 3 to 8 digits (a dictated number): 0 turns it off, otherwise 400 to 2300, recommended first step 800. Czech agents on the default profile already wait 400, so 400 has no effect. Omit for the engine default (0)."New value: +"Silence floor in ms after a reply ending with 3 to 8 digits (a dictated number): 0 turns it off, otherwise 400 to 2300, recommended first step 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0)."
    • changedInput schema / properties / turnLongSpeechFloorMs / description
      Previous value: -"Silence floor in ms after the caller spoke longer than turnLongSpeechSecs: 0 turns it off, otherwise 400 to 2300, suggested 800. Czech agents on the default profile already wait 400, so 400 has no effect. Omit for the engine default (0)."New value: +"Silence floor in ms after the caller spoke longer than turnLongSpeechSecs: 0 turns it off, otherwise 400 to 2300, suggested 800. Czech agents on the default profile already wait 300, so 400 adds 100 ms. Omit for the engine default (0)."
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, non-idempotent and open-world, and the description then goes far beyond them: it lists concrete failure codes (invalid_workflow, engine_not_configured, engine_setup_incomplete, unsupported_for_number_type, in_progress, engine_readback_mismatch), states that the agent was not created in those cases, warns against retrying, and notes billing of the transferred leg and the customer's legal disclosure duty. That is unusually rich context for a mutation tool.

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

Conciseness2/5

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

Nearly the entire definition is one enormous run-on paragraph with deeply nested parentheticals, including a multi-line explanation of firstMessageProtectSecs interrupting words. Only the first sentence is front-loaded; after that an agent must parse a wall of text to find the operational rules, and much of the schema's own content is restated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 30-parameter, deeply nested creation tool with no output schema, the description covers failure modes, warnings codes, provider selection and pointer to /openapi.json for the response shape, which is close to what an agent needs. It stops short of describing the returned object's fields itself, relying on external docs and on the instruction to 'inspect the returned provider'.

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 description coverage is 100%, so the schema already documents all 30 parameters, which sets the baseline at 3. The description does add real cross-parameter meaning — the useForOutboundTasks/transferTo/voiceId interaction, the numberE164 engine constraint, and the workflow node-as-scope model — but much of it duplicates the schema text rather than extending it.

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 first sentence gives a concrete verb and resource ('Create a voice agent that can make and take calls') and immediately names the two required fields, so the agent knows exactly which operation this is. It is also implicitly contrasted with update_agent and list_agents later in the text, which handle post-creation changes and lookup respectively.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description gives substantial conditional guidance: omit voiceId when the final provider is uncertain, use list_voices with provider: 'elevenlabs' for its catalog, use list_agents to find the created agent, and update_agent cannot select a provider. What it lacks is a crisp 'use this instead of X when Y' framing against the sibling set; the routing is scattered through thousands of words rather than stated up front.

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.