@omnidim-ai/mcp-server 0.18.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/procedures.ts CHANGED
@@ -65,7 +65,14 @@ give it a **phone number** and optionally a **knowledge base**, then place
65
65
  3. **The agent's numeric \`voice\` field is not used for speech.** It can read
66
66
  back as \`false\` on an API-created agent; that is normal. The call handler
67
67
  uses \`voice_external_id\` + \`voice_provider\`.
68
- 4. **Set a transcriber** (e.g. \`deepgram_stream\` / \`nova-3\` / \`en-US\`).
68
+ 4. **Use the platform defaults:** transcriber \`soniox\`, one of the
69
+ OmniDimension voices, model \`gpt-4.1-mini\`. Pick another provider only when
70
+ the user names one. OmniDimension voices are our most recommended voices:
71
+ picked by our team for each language and tested on real calls. List them
72
+ with \`listVoices\` \`provider=featured\`, best first, and save one as
73
+ \`voice.provider\` = its \`service\` (\`cartesia\`) with its \`name\` as
74
+ \`voice_id\`. A Cartesia \`search\` does not find them. If none fits the
75
+ language or tone, pick another \`cartesia\` voice.
69
76
  5. **\`dispatchCall\` returning \`success: true\` does NOT mean a call
70
77
  connected.** It means the request was accepted. Proof of a real call is a
71
78
  resulting entry in \`listCallLogs\` whose \`getCallLog\` shows a non-empty
@@ -98,27 +105,37 @@ production, grouped by the language your callers speak. Use \`listSTTProviders\`
98
105
 
99
106
  - Default: \`gpt-4.1-mini\` — fast and accurate across languages, a good first
100
107
  choice for almost any agent.
101
- - Alternatives: \`gemini-2.5-flash\`, \`gpt-4o\` (premium), \`gpt-4.1-nano\` (lighter).
108
+ - Alternatives: any other \`name\` from \`listLLMProviders\`, which lists only the
109
+ models your organization can use.
110
+
111
+ ## Voice
112
+
113
+ - Default: one of the OmniDimension voices, our most recommended voices. Our
114
+ team picks them for each language and tests them on real calls. List them
115
+ with \`listVoices\` \`provider=featured\`, best first, and save one under its
116
+ \`service\` (\`cartesia\`). See \`omnidim://reference/voices\`.
102
117
 
103
118
  ## By caller language
104
119
 
105
- - **Indian English (en-IN):** transcriber \`azure_stream\`; voice \`cartesia\`
106
- (default), \`eleven_labs\`, or \`google\`.
120
+ - **Indian English (en-IN):** transcriber \`soniox\`; an OmniDimension voice
121
+ for English (India).
107
122
  - **Hindi / Hinglish (mixed Hindi and English):** transcriber \`soniox\`
108
- (handles code-mixed speech in one stream); voice \`cartesia\` or \`eleven_labs\`.
109
- - **Other Indian languages (Telugu, Bengali, etc.):** transcriber \`soniox\` or
110
- \`sarvam\` (tuned for Indian languages); voice \`cartesia\` or \`sarvam\`.
111
- - **US / UK English:** transcriber \`azure_stream\` or \`deepgram_stream\`; voice
112
- \`cartesia\` or \`eleven_labs\`.
123
+ (handles code-mixed speech in one stream); an OmniDimension voice for Hindi.
124
+ - **Other Indian languages (Tamil, Telugu, Marathi, Bengali, Gujarati,
125
+ Kannada, Malayalam, Punjabi):** transcriber \`soniox\`, or \`sarvam\` (tuned for
126
+ Indian languages); an OmniDimension voice for that language.
127
+ - **US English:** transcriber \`soniox\` or \`deepgram_stream\`; an OmniDimension
128
+ voice for English (American).
129
+ - **No OmniDimension voice for the language:** another \`cartesia\` voice.
113
130
 
114
131
  ## Field notes
115
132
 
116
- - \`transcriber.provider\` is one of \`deepgram_stream\`, \`azure_stream\`,
117
- \`soniox\`, \`sarvam\`, \`cartesia\`. \`deepgram_stream\` also needs a \`model\`
118
- (\`nova-3\` or \`nova-2\`); the others do not.
119
- - \`voice.provider\` is one of \`cartesia\`, \`eleven_labs\`, \`google\`,
120
- \`sarvam\`. \`cartesia\` voices need a \`model\` such as \`sonic-3.5\`; for
121
- \`eleven_labs\` the model is implied by the voice.
133
+ - \`transcriber.provider\` is a \`name\` from \`listSTTProviders\`, which lists only
134
+ the transcribers your organization can use. \`deepgram_stream\` also needs a
135
+ \`model\` (\`nova-3\` or \`nova-2\`); the others do not.
136
+ - \`voice.provider\` is the \`service\` of a voice from \`listVoices\`, which lists
137
+ only voices your organization can use. Send only \`provider\` and \`voice_id\`:
138
+ the platform picks the voice model.
122
139
 
123
140
  ## Responsiveness
124
141
 
@@ -127,26 +144,34 @@ production, grouped by the language your callers speak. Use \`listSTTProviders\`
127
144
  \`omnidim://reference/voices\`).
128
145
  `;
129
146
 
130
- // How to choose a voice, with the synthesizable-voice gotcha and per-provider notes.
147
+ // How to choose a voice: OmniDimension voices first, then other Cartesia voices.
131
148
  const VOICES_GUIDE = `# Choosing a voice
132
149
 
133
- \`listVoices\` returns the catalog. Use a voice's \`name\` field as the
134
- \`voice_id\` you pass to \`createAgent\`. Quality varies by language and not every
135
- voice synthesizes cleanly, so always place a short test call and listen before
136
- launch.
150
+ \`listVoices\` returns only the voices your organization can use. Use a voice's
151
+ \`name\` field as the \`voice_id\` and its \`service\` as the \`voice.provider\` you
152
+ pass to \`createAgent\`.
153
+
154
+ ## Start with OmniDimension voices
137
155
 
138
- Filter \`listVoices\` by \`provider\` (\`cartesia\`, \`eleven_labs\`, \`google\`,
139
- \`sarvam\`). ElevenLabs also supports \`language\`, \`accent\`, and \`gender\`.
156
+ OmniDimension voices are our most recommended voices. Our team picks them for
157
+ each language and tests them on real calls. Use one unless the user asks for
158
+ something else.
140
159
 
141
- By provider:
160
+ - List them with \`listVoices\` \`provider=featured\`. They come back best first.
161
+ - They cover English (India), English (American), Hindi, Tamil, Telugu,
162
+ Marathi, Bengali, Gujarati, Kannada, Malayalam and Punjabi.
163
+ - Each one runs on Cartesia: save it as \`voice.provider\` \`cartesia\` with its
164
+ \`name\` as \`voice_id\`.
165
+ - A Cartesia \`search\` does not find them. Only \`provider=featured\` lists them.
142
166
 
143
- - **\`cartesia\`** — low-latency multilingual voices; the platform default. Pass a
144
- \`model\` such as \`sonic-3.5\`. Example voice_id
145
- \`bf0a246a-8642-498a-9950-80c35e9276b5\` ("Sophie", English female).
146
- - **\`eleven_labs\`** — premium, expressive voices; the model is implied by the
147
- voice. Example voice_id \`JBFqnCBsd6RMkjVDRZzb\` ("George").
148
- - **\`sarvam\`** — natural prosody for Indian languages.
149
- - **\`google\`** — broad language coverage.
167
+ Example: Aadya, English (India) and Hindi, voice_id
168
+ \`b521b304-7672-4cf9-9a34-b4eb1df1bde0\`.
169
+
170
+ ## If none fits
171
+
172
+ Pick another \`cartesia\` voice. \`listVoices\` \`provider=cartesia\` filters by
173
+ \`search\`, \`language\`, \`accent\` and \`gender\`. Not every catalog voice
174
+ synthesizes cleanly, so place a short test call and listen before launch.
150
175
  `;
151
176
 
152
177
  // The createAgent field shape with two complete, copy-ready examples.
@@ -161,8 +186,8 @@ routing guide). The fields inside:
161
186
  agent's instructions.
162
187
  - \`call_type\` — "Incoming" or "Outgoing".
163
188
  - \`model\` — \`{ model, temperature? }\`, e.g. \`{ "model": "gpt-4.1-mini" }\`.
164
- - \`voice\` — \`{ provider, voice_id, model? }\`. \`model\` (e.g. \`sonic-3.5\`)
165
- is only needed for \`cartesia\`.
189
+ - \`voice\` — \`{ provider, voice_id }\`. Start with an OmniDimension voice
190
+ (\`listVoices\` \`provider=featured\`); its \`service\` is the \`provider\`.
166
191
  - \`transcriber\` — \`{ provider, model?, language? }\`. \`model\` (\`nova-3\` /
167
192
  \`nova-2\`) is only needed for \`deepgram_stream\`.
168
193
 
@@ -177,8 +202,8 @@ routing guide). The fields inside:
177
202
  ],
178
203
  "call_type": "Incoming",
179
204
  "model": { "model": "gpt-4.1-mini" },
180
- "voice": { "provider": "cartesia", "model": "sonic-3.5", "voice_id": "bf0a246a-8642-498a-9950-80c35e9276b5" },
181
- "transcriber": { "provider": "azure_stream" }
205
+ "voice": { "provider": "cartesia", "voice_id": "b521b304-7672-4cf9-9a34-b4eb1df1bde0" },
206
+ "transcriber": { "provider": "soniox" }
182
207
  }
183
208
  }
184
209
 
@@ -193,7 +218,7 @@ routing guide). The fields inside:
193
218
  ],
194
219
  "call_type": "Outgoing",
195
220
  "model": { "model": "gpt-4.1-mini" },
196
- "voice": { "provider": "cartesia", "model": "sonic-3.5", "voice_id": "<pick one from listVoices>" },
221
+ "voice": { "provider": "cartesia", "voice_id": "<a Hindi voice from listVoices provider=featured>" },
197
222
  "transcriber": { "provider": "soniox" }
198
223
  }
199
224
  }
@@ -593,7 +618,7 @@ const RESOURCES: ResourceDef[] = [
593
618
  {
594
619
  uri: "omnidim://reference/voices",
595
620
  name: "Choosing a voice",
596
- description: "How to pick a voice from listVoices (use the name as voice_id), per-provider notes, and the verify-on-a-test-call rule.",
621
+ description: "Start with OmniDimension voices (listVoices provider=featured), our most recommended; how to save one, and what to pick when none fits.",
597
622
  mimeType: "text/markdown",
598
623
  text: VOICES_GUIDE,
599
624
  },
@@ -683,7 +708,7 @@ Read the \`omnidim://guide/workflows\` resource first. It explains triggers, out
683
708
  const purpose = a.purpose || "(describe the agent's job)";
684
709
  const voiceLine = a.voice_id
685
710
  ? `Use voice_id "${a.voice_id}" (the \`name\` from listVoices).`
686
- : `Call \`listVoices\` and pick a premade voice; use its \`name\` as voice_id. Remember not every listed voice synthesizes, so verify audio on the test call.`;
711
+ : `Start with the OmniDimension voices, our most recommended: call \`listVoices\` with \`provider=featured\` and pick the first one that speaks the caller's language. Use its \`name\` as voice_id and its \`service\` (\`cartesia\`) as the voice provider. Verify audio on the test call.`;
687
712
  const testLine = a.test_number
688
713
  ? `5. Place a verification call with \`dispatchCall\` { requestBody: { agent_id, to_number: "${a.test_number}" } } (omit from_number_id to use the default outbound number). Capture the returned requestId.
689
714
  6. Poll \`listCallLogs\` { pagesize: 1 } until a new row appears for ${a.test_number}, then \`getCallLog\` on its id. The call is verified ONLY if \`call_conversation\` is non-empty (the agent actually spoke). A successful dispatch response alone is not proof.`
@@ -703,8 +728,8 @@ Follow these steps in order. Each write tool wraps its payload in \`requestBody\
703
728
  "context_breakdown": [ { "title": "Purpose", "body": "<the agent's instructions, derived from the purpose above>" } ],
704
729
  "call_type": "Outgoing",
705
730
  "model": { "model": "gpt-4.1-mini", "temperature": 0.5 },
706
- "voice": { "provider": "eleven_labs", "voice_id": "<voice name>" },
707
- "transcriber": { "provider": "deepgram_stream", "model": "nova-3", "language": "en-US" }
731
+ "voice": { "provider": "cartesia", "voice_id": "<name from listVoices provider=featured>" },
732
+ "transcriber": { "provider": "soniox" }
708
733
  }
709
734
  }
710
735
  Capture the returned \`id\` as agent_id. (\`status\` is always "Completed"; it is not a build signal.)
package/src/telemetry.ts CHANGED
@@ -70,7 +70,21 @@ function baseFields(): BaseFields {
70
70
  };
71
71
  }
72
72
 
73
- async function send(event: string, extra: Record<string, unknown> = {}): Promise<void> {
73
+ // Fire-and-forget sends tracked so the setup command can wait for them before process.exit.
74
+ const pending = new Set<Promise<void>>();
75
+
76
+ export async function flushTelemetry(): Promise<void> {
77
+ await Promise.allSettled([...pending]);
78
+ }
79
+
80
+ function send(event: string, extra: Record<string, unknown> = {}): Promise<void> {
81
+ const p = doSend(event, extra);
82
+ pending.add(p);
83
+ void p.finally(() => pending.delete(p));
84
+ return p;
85
+ }
86
+
87
+ async function doSend(event: string, extra: Record<string, unknown>): Promise<void> {
74
88
  if (isTelemetryDisabled()) return;
75
89
  const body = {
76
90
  event,
@@ -14,9 +14,22 @@ export interface ToolAnnotations {
14
14
  // Tools that are not spec operations, so they carry no x-mcp block.
15
15
  const HAND_MARKS: Record<string, ToolAnnotations> = {
16
16
  showWorkflow: { title: "Show workflow canvas", readOnlyHint: true, openWorldHint: false },
17
+ searchDocs: { title: "Search the docs", readOnlyHint: true, openWorldHint: false },
18
+ readDoc: { title: "Read a docs page", readOnlyHint: true, openWorldHint: false },
17
19
  };
18
20
 
19
21
  // Spec tools get their marks from the spec's x-mcp block, through regen.
20
22
  export function toolAnnotations(def: { name: string; method: string }): ToolAnnotations {
21
23
  return { ...(TOOL_MARKS[def.name] ?? HAND_MARKS[def.name] ?? {}) };
22
24
  }
25
+
26
+ // OMNIDIM_READONLY=1 serves only tools that read data, so an agent cannot change the account or place a call.
27
+ export function readOnlyMode(env: Record<string, string | undefined> = process.env): boolean {
28
+ return ["1", "true", "on", "yes"].includes((env.OMNIDIM_READONLY ?? "").toLowerCase());
29
+ }
30
+
31
+ export function keepReadOnlyTools(map: Map<string, { name: string; method: string }>): void {
32
+ for (const def of [...map.values()]) {
33
+ if (!toolAnnotations(def).readOnlyHint) map.delete(def.name);
34
+ }
35
+ }