@omnidim-ai/mcp-server 0.18.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -6,8 +6,9 @@ import { readApiKey } from "./credentials.js";
6
6
  import { isInteractive, printInteractiveHelp, requestIdNote, startupBanner, trimLargeResponse, USER_AGENT } from "./helpers.js";
7
7
  import { beginSession, emitSessionCrash, emitSessionEnd, endSession, recordToolError, recordToolResult } from "./telemetry.js";
8
8
  import { registerProcedures } from "./procedures.js";
9
- import { toolAnnotations } from "./tool-annotations.js";
9
+ import { keepReadOnlyTools, readOnlyMode, toolAnnotations } from "./tool-annotations.js";
10
10
  import { addShowWorkflow, toolMeta } from "./workflow-canvas.js";
11
+ import { addDocsTools, callDocsTool, isDocsTool } from "./docs-tools.js";
11
12
  import { notifyUpdates } from "./update_notifier.js";
12
13
 
13
14
 
@@ -50,7 +51,7 @@ interface McpToolDefinition {
50
51
  * Server configuration
51
52
  */
52
53
  export const SERVER_NAME = "OmniDimension";
53
- export const SERVER_VERSION = "0.18.1"; // x-release-please-version
54
+ export const SERVER_VERSION = "0.19.0"; // x-release-please-version
54
55
  // Base URL for the API. Pinned to production; not env-overridable.
55
56
  export const API_BASE_URL = "https://omnidim.io/api/v1";
56
57
 
@@ -103,7 +104,7 @@ connect and talk, see "Connect the client and talk" below the
103
104
  request details.
104
105
 
105
106
  (Tags: Sessions)`,
106
- inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","type"],"properties":{"agent_id":{"type":"number","description":"ID of the agent the session talks to."},"type":{"type":"string","default":"voice","enum":["voice"],"description":"The session type. Only `voice` is supported."},"custom_variables":{"type":"object","additionalProperties":true,"description":"Per-session variables that personalize the conversation.\nSet server-side, so visitors cannot tamper with them.\nTwo reserved keys are read as instructions for this session\nand never reach the agent: `__languages` and\n`__post_call_actions`.\n","properties":{"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this session runs in, replacing the agent's\nconfigured list. The first entry is the language the\nvisitor is greeted in. Send an array, or a pipe-separated\nstring such as `Hindi|English`.\n"},"__post_call_actions":{"allOf":[{"type":"object","description":"Side effects that fire once the call ends: email, webhook, Omni CRM,\nCloud WhatsApp, a workflow, Google Sheets, Slack, Salesforce, HubSpot\nor Zoho Bigin.\n","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"},"example":["support@example.com"]},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","voicemail_detected"]}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload.","example":"https://your-webhook-endpoint.com/omnidim-callback"},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","failed"]}}},"omni_crm":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Save the call to Omni CRM."}]},"cloud_whatsapp":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Send a Cloud WhatsApp template message after the call.","properties":{"phone_number_id":{"type":"integer","description":"The id of your organization's Cloud WhatsApp number the\nmessage is sent from.\n"},"template_id":{"type":"integer","description":"An approved template on that number. A template that is not\napproved, or that belongs to another number, is refused.\n"},"template_variables":{"type":"array","description":"Which extracted variable fills each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The key of the extracted variable whose value fills this placeholder.","example":"customer_name"}}}},"templates":{"type":"array","description":"One or more templates to send, each with its variable mapping.","items":{"type":"object","description":"One Cloud WhatsApp template to send after the call.","properties":{"template_id":{"type":"integer","description":"An approved template on the chosen number."},"usage_description":{"type":"string","description":"When this template should be sent. After the call, the model reads\nthese descriptions to choose which templates fit the conversation.\n","example":"Send when the caller books an appointment."},"always_send":{"type":"boolean","description":"Send this template after every call, whichever templates the model chooses."},"variable_mappings":{"type":"array","description":"How to fill each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The extracted variable whose value fills this placeholder."},"static_value":{"type":"string","description":"A fixed value for this placeholder. When set, it is used\ninstead of the extracted variable.\n"},"mode":{"type":"string","enum":["variable","static"],"description":"Which input the dashboard shows for this placeholder. It\ndoes not change the value sent: a `static_value` is used\nfirst, then the extracted variable, then `fallback_value`.\n"},"fallback_value":{"type":"string","description":"The value to use when the variable is not extracted."}}}}}}}}}]},"workflow":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Trigger a workflow after the call.","properties":{"workflow_id":{"type":"integer","description":"The id of the workflow to run."}}}]},"google_sheets":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Append the call to a Google Sheet. Sending this key replaces the\nagent's Google Sheets actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Google Sheets integration."},"spreadsheet_id":{"type":"string","description":"Required. The id in the sheet's URL, the part after `/d/`."},"spreadsheet_name":{"type":"string"},"worksheet_name":{"type":"string","description":"The tab to append to. Defaults to `Sheet1`."}}}]},"slack":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Post the call to a Slack channel. Sending this key replaces the\nagent's Slack actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Slack integration."},"channel_id":{"type":"string","description":"The channel id. Send this or `channel_name`."},"channel_name":{"type":"string","description":"The channel name. Send this or `channel_id`."}}}]},"salesforce":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create or update a Salesforce record from the call. Sends a\nfixed set of fields for the object, so it takes no\n`extracted_variables`. Sending this key replaces the agent's\nSalesforce actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Salesforce integration."},"object_name":{"type":"string","enum":["Lead","Contact","Account","Opportunity","Case","Task","Product"],"description":"Defaults to `Lead`."},"action":{"type":"string","enum":["create","upsert"],"description":"`upsert` finds the record by the caller's number and updates\nit or creates it. `create` creates a new record every call.\nDefaults to `create`.\n"},"match_field":{"type":"string","description":"`upsert` only: the phone field the caller's number is looked up in. Defaults to `Phone`.","example":"Phone"},"log_call":{"type":"boolean","description":"Log the call on the record, with the summary and recording link. Defaults to false."},"add_note":{"type":"boolean","description":"Add the call summary as a note on the record. Defaults to false."}}}]},"hubspot":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create a HubSpot record from the call. Sends a fixed set of\nfields for the object, so it takes no `extracted_variables`.\nSending this key replaces the agent's HubSpot actions; leaving\nit out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your HubSpot integration."},"object_name":{"type":"string","enum":["contact","company","deal","ticket"],"description":"Required."}}}]},"zoho_bigin":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Log the call in Zoho Bigin. Sending this key replaces the\nagent's Zoho Bigin actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Zoho Bigin integration."},"create_call_log":{"type":"boolean","description":"Log the call. Defaults to true."},"update_contact":{"type":"boolean","description":"Update a matching contact with what the call captured. Defaults to true."},"create_contact":{"type":"boolean","description":"Create a contact when no contact matches. Defaults to true."}}}]}}}],"description":"Post-call actions for this session only, in the same shape\nas `post_call_actions` on agent create. Email and webhook\nonly. They replace the agent's own post-call actions for\nthis session. Items that cannot be used are skipped and\nlisted in `post_call_actions_ignored`.\n"}}},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the session for your own\ntracking (e.g. CRM or lead IDs). Not shared with the\nagent; echoed back as `metadata` in the post-call\nwebhook so you can correlate results with your records.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
107
+ inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","type"],"properties":{"agent_id":{"type":"number","description":"ID of the agent the session talks to."},"type":{"type":"string","default":"voice","enum":["voice"],"description":"The session type. Only `voice` is supported."},"custom_variables":{"type":"object","additionalProperties":true,"description":"Per-session variables that personalize the conversation.\nSet server-side, so visitors cannot tamper with them.\nTwo reserved keys are read as instructions for this session\nand never reach the agent: `__languages` and\n`__post_call_actions`.\n","properties":{"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this session runs in, replacing the agent's\nconfigured list. The first entry is the language the\nvisitor is greeted in. Send an array, or a pipe-separated\nstring such as `Hindi|English`.\n"},"__post_call_actions":{"allOf":[{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"}],"description":"Post-call actions for this session only, in the same shape\nas `post_call_actions` on agent create. Email and webhook\nonly. They replace the agent's own post-call actions for\nthis session. Items that cannot be used are skipped and\nlisted in `post_call_actions_ignored`.\n"}}},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the session for your own\ntracking (e.g. CRM or lead IDs). Not shared with the\nagent; echoed back as `metadata` in the post-call\nwebhook so you can correlate results with your records.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
107
108
  method: "post",
108
109
  pathTemplate: "/sessions/create",
109
110
  executionParameters: [],
@@ -146,7 +147,7 @@ account. If it isn't enabled for yours yet,
146
147
  before configuring the \`voicemail\` object.
147
148
 
148
149
  (Tags: Agents)`,
149
- inputSchema: {"type":"object","properties":{"Idempotency-Key":{"type":"string","maxLength":255,"description":"Your own unique key for this agent, for example a fresh UUID.\nSend the same key when you retry. If the first request already\ncreated the agent, you get that agent back instead of a second\none, so a request that timed out is safe to repeat. The same key\nwith a different request body is refused. Keys are kept for 24\nhours.\n"},"requestBody":{"allOf":[{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent.","example":"Customer Support Agent"},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call.","example":"Hello! How can I help you today?"},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"},"example":{"customer_name":"Jane Doe","order_id":"ORD-12345"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown.","example":"Purpose"},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content.","example":"This agent helps customers with product inquiries and support issues."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it.","example":"America/New_York"},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use. Leave it out to use your organization's default transcriber. The STT providers list shows the ones your organization can use.","example":"deepgram_stream"},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n","example":"nova-3"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n","example":"en-US"},"silence_timeout_ms":{"type":"integer","description":"Silence timeout in milliseconds.","example":400},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"integer","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption.","example":2},"max_call_duration_in_sec":{"type":"integer","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached.","example":600},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. Leave it out to use your organization's default model. Only models your organization can use are accepted: the LLM providers list returns exactly those.","example":"gpt-4.1-mini"},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0).","example":0.7}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","enum":["cartesia","sarvam","eleven_labs","google"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list. Send `voice_id` alongside it. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use.","example":"cartesia"},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it.","example":"faf0731e-dfb9-4cfc-8119-259a79b27e12"},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use.","example":"DuckDuckGo"}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends: email, webhook, Omni CRM,\nCloud WhatsApp, a workflow, Google Sheets, Slack, Salesforce, HubSpot\nor Zoho Bigin.\n","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"},"example":["support@example.com"]},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","voicemail_detected"]}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload.","example":"https://your-webhook-endpoint.com/omnidim-callback"},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","failed"]}}},"omni_crm":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Save the call to Omni CRM."}]},"cloud_whatsapp":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Send a Cloud WhatsApp template message after the call.","properties":{"phone_number_id":{"type":"integer","description":"The id of your organization's Cloud WhatsApp number the\nmessage is sent from.\n"},"template_id":{"type":"integer","description":"An approved template on that number. A template that is not\napproved, or that belongs to another number, is refused.\n"},"template_variables":{"type":"array","description":"Which extracted variable fills each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The key of the extracted variable whose value fills this placeholder.","example":"customer_name"}}}},"templates":{"type":"array","description":"One or more templates to send, each with its variable mapping.","items":{"type":"object","description":"One Cloud WhatsApp template to send after the call.","properties":{"template_id":{"type":"integer","description":"An approved template on the chosen number."},"usage_description":{"type":"string","description":"When this template should be sent. After the call, the model reads\nthese descriptions to choose which templates fit the conversation.\n","example":"Send when the caller books an appointment."},"always_send":{"type":"boolean","description":"Send this template after every call, whichever templates the model chooses."},"variable_mappings":{"type":"array","description":"How to fill each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The extracted variable whose value fills this placeholder."},"static_value":{"type":"string","description":"A fixed value for this placeholder. When set, it is used\ninstead of the extracted variable.\n"},"mode":{"type":"string","enum":["variable","static"],"description":"Which input the dashboard shows for this placeholder. It\ndoes not change the value sent: a `static_value` is used\nfirst, then the extracted variable, then `fallback_value`.\n"},"fallback_value":{"type":"string","description":"The value to use when the variable is not extracted."}}}}}}}}}]},"workflow":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Trigger a workflow after the call.","properties":{"workflow_id":{"type":"integer","description":"The id of the workflow to run."}}}]},"google_sheets":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Append the call to a Google Sheet. Sending this key replaces the\nagent's Google Sheets actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Google Sheets integration."},"spreadsheet_id":{"type":"string","description":"Required. The id in the sheet's URL, the part after `/d/`."},"spreadsheet_name":{"type":"string"},"worksheet_name":{"type":"string","description":"The tab to append to. Defaults to `Sheet1`."}}}]},"slack":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Post the call to a Slack channel. Sending this key replaces the\nagent's Slack actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Slack integration."},"channel_id":{"type":"string","description":"The channel id. Send this or `channel_name`."},"channel_name":{"type":"string","description":"The channel name. Send this or `channel_id`."}}}]},"salesforce":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create or update a Salesforce record from the call. Sends a\nfixed set of fields for the object, so it takes no\n`extracted_variables`. Sending this key replaces the agent's\nSalesforce actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Salesforce integration."},"object_name":{"type":"string","enum":["Lead","Contact","Account","Opportunity","Case","Task","Product"],"description":"Defaults to `Lead`."},"action":{"type":"string","enum":["create","upsert"],"description":"`upsert` finds the record by the caller's number and updates\nit or creates it. `create` creates a new record every call.\nDefaults to `create`.\n"},"match_field":{"type":"string","description":"`upsert` only: the phone field the caller's number is looked up in. Defaults to `Phone`.","example":"Phone"},"log_call":{"type":"boolean","description":"Log the call on the record, with the summary and recording link. Defaults to false."},"add_note":{"type":"boolean","description":"Add the call summary as a note on the record. Defaults to false."}}}]},"hubspot":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create a HubSpot record from the call. Sends a fixed set of\nfields for the object, so it takes no `extracted_variables`.\nSending this key replaces the agent's HubSpot actions; leaving\nit out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your HubSpot integration."},"object_name":{"type":"string","enum":["contact","company","deal","ticket"],"description":"Required."}}}]},"zoho_bigin":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Log the call in Zoho Bigin. Sending this key replaces the\nagent's Zoho Bigin actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Zoho Bigin integration."},"create_call_log":{"type":"boolean","description":"Log the call. Defaults to true."},"update_contact":{"type":"boolean","description":"Update a matching contact with what the call captured. Defaults to true."},"create_contact":{"type":"boolean","description":"Create a contact when no contact matches. Defaults to true."}}}]}}},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`.","example":"+15551234567"},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option.","example":"Transfer if the customer asks to speak with a human."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer.","example":"Please hold while I connect you to one of our agents."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true.","example":"End the call once the customer's issue is resolved."},"message":{"type":"string","description":"What the agent says before hanging up.","example":"Thank you for contacting us. Have a great day!"},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`.","example":"End the call politely in the same language the user is speaking."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"},"example":["English (India)","Hindi"]}}},{"type":"object","required":["name","context_breakdown"]}],"description":"The JSON request body."}},"required":["requestBody"]},
150
+ inputSchema: {"type":"object","properties":{"Idempotency-Key":{"type":"string","maxLength":255,"description":"Your own unique key for this agent, for example a fresh UUID.\nSend the same key when you retry. If the first request already\ncreated the agent, you get that agent back instead of a second\none, so a request that timed out is safe to repeat. The same key\nwith a different request body is refused. Keys are kept for 24\nhours.\n"},"requestBody":{"allOf":[{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent.","example":"Customer Support Agent"},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call.","example":"Hello! How can I help you today?"},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"},"example":{"customer_name":"Jane Doe","order_id":"ORD-12345"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown.","example":"Purpose"},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content.","example":"This agent helps customers with product inquiries and support issues."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it.","example":"America/New_York"},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use. Leave it out to use your organization's default transcriber. The STT providers list shows the ones your organization can use.","example":"deepgram_stream"},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n","example":"nova-3"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n","example":"en-US"},"silence_timeout_ms":{"type":"integer","description":"Silence timeout in milliseconds.","example":400},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"integer","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption.","example":2},"max_call_duration_in_sec":{"type":"integer","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached.","example":600},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. Leave it out to use your organization's default model. Only models your organization can use are accepted: the LLM providers list returns exactly those.","example":"gpt-4.1-mini"},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0).","example":0.7}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","enum":["cartesia","sarvam","eleven_labs","google"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list. Send `voice_id` alongside it. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use.","example":"cartesia"},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it.","example":"faf0731e-dfb9-4cfc-8119-259a79b27e12"},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use.","example":"DuckDuckGo"}}},"post_call_actions":{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`.","example":"+15551234567"},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option.","example":"Transfer if the customer asks to speak with a human."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer.","example":"Please hold while I connect you to one of our agents."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true.","example":"End the call once the customer's issue is resolved."},"message":{"type":"string","description":"What the agent says before hanging up.","example":"Thank you for contacting us. Have a great day!"},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`.","example":"End the call politely in the same language the user is speaking."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"},"example":["English (India)","Hindi"]}}},{"type":"object","required":["name","context_breakdown"]}],"description":"The JSON request body."}},"required":["requestBody"]},
150
151
  method: "post",
151
152
  pathTemplate: "/agents/create",
152
153
  executionParameters: [{"name":"Idempotency-Key","in":"header"}],
@@ -176,7 +177,7 @@ before configuring the \`voicemail\` object.
176
177
 
177
178
  > **Voicemail detection is an access-gated feature** that we turn on per account. If it isn't enabled for yours yet, [request access](https://omnidim.io/contact-us?reason=product&lock=1) before configuring the \`voicemail\` object below.
178
179
  (Tags: Agents)`,
179
- inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"requestBody":{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent."},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call."},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown."},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use. Leave it out to use your organization's default transcriber. The STT providers list shows the ones your organization can use."},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n"},"silence_timeout_ms":{"type":"number","description":"Silence timeout in milliseconds."},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"number","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption."},"max_call_duration_in_sec":{"type":"number","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached."},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. Leave it out to use your organization's default model. Only models your organization can use are accepted: the LLM providers list returns exactly those."},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0)."}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","enum":["cartesia","sarvam","eleven_labs","google"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list. Send `voice_id` alongside it. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use."},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it."},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use."}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends: email, webhook, Omni CRM,\nCloud WhatsApp, a workflow, Google Sheets, Slack, Salesforce, HubSpot\nor Zoho Bigin.\n","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"}},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload."},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},"omni_crm":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Save the call to Omni CRM."}]},"cloud_whatsapp":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Send a Cloud WhatsApp template message after the call.","properties":{"phone_number_id":{"type":"integer","description":"The id of your organization's Cloud WhatsApp number the\nmessage is sent from.\n"},"template_id":{"type":"integer","description":"An approved template on that number. A template that is not\napproved, or that belongs to another number, is refused.\n"},"template_variables":{"type":"array","description":"Which extracted variable fills each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The key of the extracted variable whose value fills this placeholder.","example":"customer_name"}}}},"templates":{"type":"array","description":"One or more templates to send, each with its variable mapping.","items":{"type":"object","description":"One Cloud WhatsApp template to send after the call.","properties":{"template_id":{"type":"integer","description":"An approved template on the chosen number."},"usage_description":{"type":"string","description":"When this template should be sent. After the call, the model reads\nthese descriptions to choose which templates fit the conversation.\n","example":"Send when the caller books an appointment."},"always_send":{"type":"boolean","description":"Send this template after every call, whichever templates the model chooses."},"variable_mappings":{"type":"array","description":"How to fill each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The extracted variable whose value fills this placeholder."},"static_value":{"type":"string","description":"A fixed value for this placeholder. When set, it is used\ninstead of the extracted variable.\n"},"mode":{"type":"string","enum":["variable","static"],"description":"Which input the dashboard shows for this placeholder. It\ndoes not change the value sent: a `static_value` is used\nfirst, then the extracted variable, then `fallback_value`.\n"},"fallback_value":{"type":"string","description":"The value to use when the variable is not extracted."}}}}}}}}}]},"workflow":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Trigger a workflow after the call.","properties":{"workflow_id":{"type":"integer","description":"The id of the workflow to run."}}}]},"google_sheets":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Append the call to a Google Sheet. Sending this key replaces the\nagent's Google Sheets actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Google Sheets integration."},"spreadsheet_id":{"type":"string","description":"Required. The id in the sheet's URL, the part after `/d/`."},"spreadsheet_name":{"type":"string"},"worksheet_name":{"type":"string","description":"The tab to append to. Defaults to `Sheet1`."}}}]},"slack":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Post the call to a Slack channel. Sending this key replaces the\nagent's Slack actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Slack integration."},"channel_id":{"type":"string","description":"The channel id. Send this or `channel_name`."},"channel_name":{"type":"string","description":"The channel name. Send this or `channel_id`."}}}]},"salesforce":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create or update a Salesforce record from the call. Sends a\nfixed set of fields for the object, so it takes no\n`extracted_variables`. Sending this key replaces the agent's\nSalesforce actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Salesforce integration."},"object_name":{"type":"string","enum":["Lead","Contact","Account","Opportunity","Case","Task","Product"],"description":"Defaults to `Lead`."},"action":{"type":"string","enum":["create","upsert"],"description":"`upsert` finds the record by the caller's number and updates\nit or creates it. `create` creates a new record every call.\nDefaults to `create`.\n"},"match_field":{"type":"string","description":"`upsert` only: the phone field the caller's number is looked up in. Defaults to `Phone`.","example":"Phone"},"log_call":{"type":"boolean","description":"Log the call on the record, with the summary and recording link. Defaults to false."},"add_note":{"type":"boolean","description":"Add the call summary as a note on the record. Defaults to false."}}}]},"hubspot":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create a HubSpot record from the call. Sends a fixed set of\nfields for the object, so it takes no `extracted_variables`.\nSending this key replaces the agent's HubSpot actions; leaving\nit out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your HubSpot integration."},"object_name":{"type":"string","enum":["contact","company","deal","ticket"],"description":"Required."}}}]},"zoho_bigin":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Log the call in Zoho Bigin. Sending this key replaces the\nagent's Zoho Bigin actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Zoho Bigin integration."},"create_call_log":{"type":"boolean","description":"Log the call. Defaults to true."},"update_contact":{"type":"boolean","description":"Update a matching contact with what the call captured. Defaults to true."},"create_contact":{"type":"boolean","description":"Create a contact when no contact matches. Defaults to true."}}}]}}},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`."},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true."},"message":{"type":"string","description":"What the agent says before hanging up."},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"}}}}},"required":["agent_id","requestBody"]},
180
+ inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"requestBody":{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent."},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call."},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown."},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use. Leave it out to use your organization's default transcriber. The STT providers list shows the ones your organization can use."},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n"},"silence_timeout_ms":{"type":"number","description":"Silence timeout in milliseconds."},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"number","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption."},"max_call_duration_in_sec":{"type":"number","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached."},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. Leave it out to use your organization's default model. Only models your organization can use are accepted: the LLM providers list returns exactly those."},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0)."}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","enum":["cartesia","sarvam","eleven_labs","google"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list. Send `voice_id` alongside it. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use."},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it."},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use."}}},"post_call_actions":{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`."},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true."},"message":{"type":"string","description":"What the agent says before hanging up."},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"}}}}},"required":["agent_id","requestBody"]},
180
181
  method: "put",
181
182
  pathTemplate: "/agents/{agent_id}",
182
183
  executionParameters: [{"name":"agent_id","in":"path"}],
@@ -399,7 +400,7 @@ before configuring the \`voicemail\` object.
399
400
  phone number must include a country code with a leading plus.
400
401
 
401
402
  (Tags: Calls)`,
402
- inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","to_number"],"properties":{"agent_id":{"type":"number","description":"The ID of the agent that will handle the call."},"to_number":{"type":"string","description":"The phone number to call. Must include country code (e.g., +15551234567)."},"from_number_id":{"type":"number","description":"Id of a phone number on your account to place the call from (see the phone number list endpoint). Omit to use the platform's default number."},"call_context":{"type":"object","description":"Optional context information as key-value pairs to be passed to the agent during the call. Can contain any custom fields relevant to your use case.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the call for your own tracking\n(e.g. CRM or lead IDs). Not shared with the agent; echoed\nback as `metadata` in the post-call webhook so you can\ncorrelate results with your records.\n"},"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this call runs in, replacing the agent's configured\nlist for this call only. The first entry is the language the\ncall opens in. Send an array, or a pipe-separated string such\nas `Hindi|English`. Names the platform does not recognize are\nskipped and listed in `languages_ignored`.\n"},"__post_call_actions":{"allOf":[{"type":"object","description":"Side effects that fire once the call ends: email, webhook, Omni CRM,\nCloud WhatsApp, a workflow, Google Sheets, Slack, Salesforce, HubSpot\nor Zoho Bigin.\n","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"},"example":["support@example.com"]},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","voicemail_detected"]}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload.","example":"https://your-webhook-endpoint.com/omnidim-callback"},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]},"example":["completed","failed"]}}},"omni_crm":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Save the call to Omni CRM."}]},"cloud_whatsapp":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Send a Cloud WhatsApp template message after the call.","properties":{"phone_number_id":{"type":"integer","description":"The id of your organization's Cloud WhatsApp number the\nmessage is sent from.\n"},"template_id":{"type":"integer","description":"An approved template on that number. A template that is not\napproved, or that belongs to another number, is refused.\n"},"template_variables":{"type":"array","description":"Which extracted variable fills each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The key of the extracted variable whose value fills this placeholder.","example":"customer_name"}}}},"templates":{"type":"array","description":"One or more templates to send, each with its variable mapping.","items":{"type":"object","description":"One Cloud WhatsApp template to send after the call.","properties":{"template_id":{"type":"integer","description":"An approved template on the chosen number."},"usage_description":{"type":"string","description":"When this template should be sent. After the call, the model reads\nthese descriptions to choose which templates fit the conversation.\n","example":"Send when the caller books an appointment."},"always_send":{"type":"boolean","description":"Send this template after every call, whichever templates the model chooses."},"variable_mappings":{"type":"array","description":"How to fill each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The extracted variable whose value fills this placeholder."},"static_value":{"type":"string","description":"A fixed value for this placeholder. When set, it is used\ninstead of the extracted variable.\n"},"mode":{"type":"string","enum":["variable","static"],"description":"Which input the dashboard shows for this placeholder. It\ndoes not change the value sent: a `static_value` is used\nfirst, then the extracted variable, then `fallback_value`.\n"},"fallback_value":{"type":"string","description":"The value to use when the variable is not extracted."}}}}}}}}}]},"workflow":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Trigger a workflow after the call.","properties":{"workflow_id":{"type":"integer","description":"The id of the workflow to run."}}}]},"google_sheets":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Append the call to a Google Sheet. Sending this key replaces the\nagent's Google Sheets actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Google Sheets integration."},"spreadsheet_id":{"type":"string","description":"Required. The id in the sheet's URL, the part after `/d/`."},"spreadsheet_name":{"type":"string"},"worksheet_name":{"type":"string","description":"The tab to append to. Defaults to `Sheet1`."}}}]},"slack":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Post the call to a Slack channel. Sending this key replaces the\nagent's Slack actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Slack integration."},"channel_id":{"type":"string","description":"The channel id. Send this or `channel_name`."},"channel_name":{"type":"string","description":"The channel name. Send this or `channel_id`."}}}]},"salesforce":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create or update a Salesforce record from the call. Sends a\nfixed set of fields for the object, so it takes no\n`extracted_variables`. Sending this key replaces the agent's\nSalesforce actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Salesforce integration."},"object_name":{"type":"string","enum":["Lead","Contact","Account","Opportunity","Case","Task","Product"],"description":"Defaults to `Lead`."},"action":{"type":"string","enum":["create","upsert"],"description":"`upsert` finds the record by the caller's number and updates\nit or creates it. `create` creates a new record every call.\nDefaults to `create`.\n"},"match_field":{"type":"string","description":"`upsert` only: the phone field the caller's number is looked up in. Defaults to `Phone`.","example":"Phone"},"log_call":{"type":"boolean","description":"Log the call on the record, with the summary and recording link. Defaults to false."},"add_note":{"type":"boolean","description":"Add the call summary as a note on the record. Defaults to false."}}}]},"hubspot":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Create a HubSpot record from the call. Sends a fixed set of\nfields for the object, so it takes no `extracted_variables`.\nSending this key replaces the agent's HubSpot actions; leaving\nit out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your HubSpot integration."},"object_name":{"type":"string","enum":["contact","company","deal","ticket"],"description":"Required."}}}]},"zoho_bigin":{"allOf":[{"type":"object","description":"Settings every post-call channel shares.","properties":{"enabled":{"type":"boolean"},"include":{"type":"array","description":"Which sections to include in this action.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for this action.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"type":"object","description":"Log the call in Zoho Bigin. Sending this key replaces the\nagent's Zoho Bigin actions; leaving it out keeps them.\n","properties":{"integration_id":{"type":"integer","description":"Required. The id of your Zoho Bigin integration."},"create_call_log":{"type":"boolean","description":"Log the call. Defaults to true."},"update_contact":{"type":"boolean","description":"Update a matching contact with what the call captured. Defaults to true."},"create_contact":{"type":"boolean","description":"Create a contact when no contact matches. Defaults to true."}}}]}}}],"description":"Post-call actions for this call only, in the same shape as\n`post_call_actions` on agent create. Email and webhook only.\nThey replace the agent's own post-call actions for this call;\nthe agent is not changed. Items that cannot be used are\nskipped and listed in `post_call_actions_ignored`, and the\ncall still goes out. Can also be sent inside `call_context`.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
403
+ inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","to_number"],"properties":{"agent_id":{"type":"number","description":"The ID of the agent that will handle the call."},"to_number":{"type":"string","description":"The phone number to call. Must include country code (e.g., +15551234567)."},"from_number_id":{"type":"number","description":"Id of a phone number on your account to place the call from (see the phone number list endpoint). Omit to use the platform's default number."},"call_context":{"type":"object","description":"Optional context information as key-value pairs to be passed to the agent during the call. Can contain any custom fields relevant to your use case.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the call for your own tracking\n(e.g. CRM or lead IDs). Not shared with the agent; echoed\nback as `metadata` in the post-call webhook so you can\ncorrelate results with your records.\n"},"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this call runs in, replacing the agent's configured\nlist for this call only. The first entry is the language the\ncall opens in. Send an array, or a pipe-separated string such\nas `Hindi|English`. Names the platform does not recognize are\nskipped and listed in `languages_ignored`.\n"},"__post_call_actions":{"allOf":[{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"}],"description":"Post-call actions for this call only, in the same shape as\n`post_call_actions` on agent create. Email and webhook only.\nThey replace the agent's own post-call actions for this call;\nthe agent is not changed. Items that cannot be used are\nskipped and listed in `post_call_actions_ignored`, and the\ncall still goes out. Can also be sent inside `call_context`.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
403
404
  method: "post",
404
405
  pathTemplate: "/calls/dispatch",
405
406
  executionParameters: [],
@@ -1873,6 +1874,8 @@ or already-canceled campaign cannot be canceled.
1873
1874
  }],
1874
1875
  ]);
1875
1876
  addShowWorkflow(toolDefinitionMap);
1877
+ addDocsTools(toolDefinitionMap);
1878
+ if (readOnlyMode()) keepReadOnlyTools(toolDefinitionMap);
1876
1879
 
1877
1880
  /**
1878
1881
  * Security schemes from the OpenAPI spec
@@ -1905,6 +1908,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request: CallToolRequest)
1905
1908
  console.error(`Error: Unknown tool requested: ${toolName}`);
1906
1909
  return { content: [{ type: "text", text: `Error: Unknown tool requested: ${toolName}` }] };
1907
1910
  }
1911
+ if (isDocsTool(toolName)) return await callDocsTool(toolName, toolArgs ?? {});
1908
1912
  return await executeApiTool(toolName, toolDefinition, toolArgs ?? {}, securitySchemes);
1909
1913
  });
1910
1914
 
@@ -2341,7 +2345,11 @@ async function executeApiTool(
2341
2345
  async function main() {
2342
2346
  if (process.argv[2] === "setup") {
2343
2347
  const { runSetup } = await import("./setup.js");
2344
- process.exit(await runSetup());
2348
+ const code = await runSetup();
2349
+ // setup fires its events without awaiting; exiting now would drop them (install never arrived).
2350
+ const { flushTelemetry } = await import("./telemetry.js");
2351
+ await flushTelemetry();
2352
+ process.exit(code);
2345
2353
  }
2346
2354
  if (process.argv[2] === "telemetry") {
2347
2355
  const { runTelemetryCommand } = await import("./telemetry-cli.js");
@@ -2360,6 +2368,9 @@ async function main() {
2360
2368
  await server.connect(transport);
2361
2369
  console.error(startupBanner(SERVER_VERSION, toolDefinitionMap.size));
2362
2370
  beginSession();
2371
+ // Only for the stdio server: a client that closes the pipe or hangs up (not kill -9) sends no other end signal.
2372
+ process.on('SIGHUP', cleanup);
2373
+ process.stdin.on('end', cleanup);
2363
2374
  notifyUpdates(SERVER_VERSION);
2364
2375
  } catch (error) {
2365
2376
  try { await emitSessionCrash(error); } catch { /* telemetry must never mask the crash */ }
@@ -2371,14 +2382,19 @@ async function main() {
2371
2382
  /**
2372
2383
  * Cleanup function for graceful shutdown
2373
2384
  */
2374
- async function cleanup() {
2375
- try {
2376
- await emitSessionEnd(endSession());
2377
- } catch {
2378
- // telemetry must never block shutdown
2379
- }
2380
- console.error("Shutting down MCP server...");
2381
- process.exit(0);
2385
+ // One shutdown at a time: a SIGTERM after stdin closes must not exit before session_end is sent.
2386
+ let shuttingDown: Promise<void> | undefined;
2387
+ function cleanup(): Promise<void> {
2388
+ shuttingDown ??= (async () => {
2389
+ try {
2390
+ await emitSessionEnd(endSession());
2391
+ } catch {
2392
+ // telemetry must never block shutdown
2393
+ }
2394
+ console.error("Shutting down MCP server...");
2395
+ process.exit(0);
2396
+ })();
2397
+ return shuttingDown;
2382
2398
  }
2383
2399
 
2384
2400
  // Register signal handlers
package/src/telemetry.ts CHANGED
@@ -70,7 +70,21 @@ function baseFields(): BaseFields {
70
70
  };
71
71
  }
72
72
 
73
- async function send(event: string, extra: Record<string, unknown> = {}): Promise<void> {
73
+ // Fire-and-forget sends tracked so the setup command can wait for them before process.exit.
74
+ const pending = new Set<Promise<void>>();
75
+
76
+ export async function flushTelemetry(): Promise<void> {
77
+ await Promise.allSettled([...pending]);
78
+ }
79
+
80
+ function send(event: string, extra: Record<string, unknown> = {}): Promise<void> {
81
+ const p = doSend(event, extra);
82
+ pending.add(p);
83
+ void p.finally(() => pending.delete(p));
84
+ return p;
85
+ }
86
+
87
+ async function doSend(event: string, extra: Record<string, unknown>): Promise<void> {
74
88
  if (isTelemetryDisabled()) return;
75
89
  const body = {
76
90
  event,