@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/README.md +6 -0
- package/build/docs-tools.d.ts +12 -0
- package/build/docs-tools.js +105 -0
- package/build/docs-tools.js.map +1 -0
- package/build/helpers.js +39 -7
- package/build/helpers.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +34 -16
- package/build/index.js.map +1 -1
- package/build/telemetry.d.ts +1 -0
- package/build/telemetry.js +12 -1
- package/build/telemetry.js.map +1 -1
- package/build/tool-annotations.d.ts +5 -0
- package/build/tool-annotations.js +19 -159
- package/build/tool-annotations.js.map +1 -1
- package/build/tool-marks.d.ts +2 -0
- package/build/tool-marks.js +621 -0
- package/build/tool-marks.js.map +1 -0
- package/package.json +2 -1
- package/src/docs-tools.ts +109 -0
- package/src/helpers.ts +39 -8
- package/src/index.ts +31 -15
- package/src/telemetry.ts +15 -1
- package/src/tool-annotations.ts +22 -162
- package/src/tool-marks.ts +623 -0
package/build/index.js
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
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
13
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -19,7 +20,7 @@ import axios from 'axios';
|
|
|
19
20
|
* Server configuration
|
|
20
21
|
*/
|
|
21
22
|
export const SERVER_NAME = "OmniDimension";
|
|
22
|
-
export const SERVER_VERSION = "0.
|
|
23
|
+
export const SERVER_VERSION = "0.19.0"; // x-release-please-version
|
|
23
24
|
// Base URL for the API. Pinned to production; not env-overridable.
|
|
24
25
|
export const API_BASE_URL = "https://omnidim.io/api/v1";
|
|
25
26
|
/**
|
|
@@ -64,7 +65,7 @@ connect and talk, see "Connect the client and talk" below the
|
|
|
64
65
|
request details.
|
|
65
66
|
|
|
66
67
|
(Tags: Sessions)`,
|
|
67
|
-
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"] },
|
|
68
|
+
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"] },
|
|
68
69
|
method: "post",
|
|
69
70
|
pathTemplate: "/sessions/create",
|
|
70
71
|
executionParameters: [],
|
|
@@ -107,7 +108,7 @@ account. If it isn't enabled for yours yet,
|
|
|
107
108
|
before configuring the \`voicemail\` object.
|
|
108
109
|
|
|
109
110
|
(Tags: Agents)`,
|
|
110
|
-
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"] },
|
|
111
|
+
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"] },
|
|
111
112
|
method: "post",
|
|
112
113
|
pathTemplate: "/agents/create",
|
|
113
114
|
executionParameters: [{ "name": "Idempotency-Key", "in": "header" }],
|
|
@@ -137,7 +138,7 @@ before configuring the \`voicemail\` object.
|
|
|
137
138
|
|
|
138
139
|
> **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.
|
|
139
140
|
(Tags: Agents)`,
|
|
140
|
-
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"] },
|
|
141
|
+
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"] },
|
|
141
142
|
method: "put",
|
|
142
143
|
pathTemplate: "/agents/{agent_id}",
|
|
143
144
|
executionParameters: [{ "name": "agent_id", "in": "path" }],
|
|
@@ -360,7 +361,7 @@ before configuring the \`voicemail\` object.
|
|
|
360
361
|
phone number must include a country code with a leading plus.
|
|
361
362
|
|
|
362
363
|
(Tags: Calls)`,
|
|
363
|
-
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"] },
|
|
364
|
+
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"] },
|
|
364
365
|
method: "post",
|
|
365
366
|
pathTemplate: "/calls/dispatch",
|
|
366
367
|
executionParameters: [],
|
|
@@ -1834,6 +1835,9 @@ or already-canceled campaign cannot be canceled.
|
|
|
1834
1835
|
}],
|
|
1835
1836
|
]);
|
|
1836
1837
|
addShowWorkflow(toolDefinitionMap);
|
|
1838
|
+
addDocsTools(toolDefinitionMap);
|
|
1839
|
+
if (readOnlyMode())
|
|
1840
|
+
keepReadOnlyTools(toolDefinitionMap);
|
|
1837
1841
|
/**
|
|
1838
1842
|
* Security schemes from the OpenAPI spec
|
|
1839
1843
|
*/
|
|
@@ -1861,6 +1865,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1861
1865
|
console.error(`Error: Unknown tool requested: ${toolName}`);
|
|
1862
1866
|
return { content: [{ type: "text", text: `Error: Unknown tool requested: ${toolName}` }] };
|
|
1863
1867
|
}
|
|
1868
|
+
if (isDocsTool(toolName))
|
|
1869
|
+
return await callDocsTool(toolName, toolArgs ?? {});
|
|
1864
1870
|
return await executeApiTool(toolName, toolDefinition, toolArgs ?? {}, securitySchemes);
|
|
1865
1871
|
});
|
|
1866
1872
|
/**
|
|
@@ -2246,7 +2252,11 @@ async function executeApiTool(toolName, definition, toolArgs, allSecuritySchemes
|
|
|
2246
2252
|
async function main() {
|
|
2247
2253
|
if (process.argv[2] === "setup") {
|
|
2248
2254
|
const { runSetup } = await import("./setup.js");
|
|
2249
|
-
|
|
2255
|
+
const code = await runSetup();
|
|
2256
|
+
// setup fires its events without awaiting; exiting now would drop them (install never arrived).
|
|
2257
|
+
const { flushTelemetry } = await import("./telemetry.js");
|
|
2258
|
+
await flushTelemetry();
|
|
2259
|
+
process.exit(code);
|
|
2250
2260
|
}
|
|
2251
2261
|
if (process.argv[2] === "telemetry") {
|
|
2252
2262
|
const { runTelemetryCommand } = await import("./telemetry-cli.js");
|
|
@@ -2265,6 +2275,9 @@ async function main() {
|
|
|
2265
2275
|
await server.connect(transport);
|
|
2266
2276
|
console.error(startupBanner(SERVER_VERSION, toolDefinitionMap.size));
|
|
2267
2277
|
beginSession();
|
|
2278
|
+
// Only for the stdio server: a client that closes the pipe or hangs up (not kill -9) sends no other end signal.
|
|
2279
|
+
process.on('SIGHUP', cleanup);
|
|
2280
|
+
process.stdin.on('end', cleanup);
|
|
2268
2281
|
notifyUpdates(SERVER_VERSION);
|
|
2269
2282
|
}
|
|
2270
2283
|
catch (error) {
|
|
@@ -2279,15 +2292,20 @@ async function main() {
|
|
|
2279
2292
|
/**
|
|
2280
2293
|
* Cleanup function for graceful shutdown
|
|
2281
2294
|
*/
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2295
|
+
// One shutdown at a time: a SIGTERM after stdin closes must not exit before session_end is sent.
|
|
2296
|
+
let shuttingDown;
|
|
2297
|
+
function cleanup() {
|
|
2298
|
+
shuttingDown ??= (async () => {
|
|
2299
|
+
try {
|
|
2300
|
+
await emitSessionEnd(endSession());
|
|
2301
|
+
}
|
|
2302
|
+
catch {
|
|
2303
|
+
// telemetry must never block shutdown
|
|
2304
|
+
}
|
|
2305
|
+
console.error("Shutting down MCP server...");
|
|
2306
|
+
process.exit(0);
|
|
2307
|
+
})();
|
|
2308
|
+
return shuttingDown;
|
|
2291
2309
|
}
|
|
2292
2310
|
// Register signal handlers
|
|
2293
2311
|
process.on('SIGINT', cleanup);
|