tools · v0.0.1

The tool reference.

Every tool the Crixin voice MCP server exposes — what it does, the JSON schema it accepts, and a copy-pasteable example. Use these names verbatim when prompting your AI host: make_call, send_sms, etc.

make_call — place an outbound voice call

Pass to + a prompt and the assistant will speak it; the recipient's reply is recorded for up to 60 seconds by default. Or pass raw twiml for full control. Inline TwiML means no public webhook required.

Parameters

FieldTypeDescription
to requiredstringE.164 destination number, e.g. +15555550100.
prompt optionalstringWhat the assistant should say when the recipient picks up. If record isn't false, a recording prompt is appended.
closing_message optionalstringFinal line spoken before hangup.
twiml optionalstringInline TwiML XML to use instead of the prompt/record flow. If set, prompt is ignored.
url optionalstringPublic URL Twilio fetches for TwiML. Use only for stateful flows.
record optionalbooleanRecord the recipient's reply. Default true. Ignored when twiml or url is supplied.
voice optionalstringTwilio TTS voice. See voices. Default Polly.Joanna-Neural.
language optionalstringLocale tag matching the voice, e.g. en-US, ar-EG.
max_recording_seconds optionalintegerDefault 60. Max 14400.
machine_detection optionalenumEnable · DetectMessageEnd · none. Default Enable.
status_callback optionalstringPublic URL Twilio POSTs to as the call progresses.

Example

// In your AI host's chat:
"use crixin voice to call +15555550100 and ask in Egyptian Arabic
what time their basketball court opens; record their reply for 60 seconds."

// What the agent calls:
make_call({
  to: "+15555550100",
  prompt: "السلام عليكم، هل ممكن تقولولي إيه مواعيد ملعب كرة السلة عندكم؟",
  voice: "Polly.Hala-Neural",
  language: "ar-EG",
  max_recording_seconds: 60
})

// Returns:
{
  "sid": "CA94e1d8…3a02",
  "status": "queued",
  "to": "+15555550100",
  "from": "+15555550100",
  "direction": "outbound-api",
  "start_time": null
}

get_call — look up one call by SID

Returns status, duration, price, start/end timestamps. Useful right after make_call to poll until the call moves to completed.

FieldTypeDescription
call_sid requiredstringThe SID returned by make_call, e.g. CA94e1d8….
get_call({ call_sid: "CA94e1d8…3a02" })

// → status: 'completed', duration: '47', price: '-0.0085', price_unit: 'USD'

list_calls — recent call history

Filter by destination, source, status, or start window.

FieldTypeDescription
to optionalstringE.164 filter on the called number.
from optionalstringE.164 filter on the calling number.
status optionalenumqueued, ringing, in-progress, completed, busy, failed, no-answer, canceled.
start_time_after optionalstringISO 8601 timestamp.
page_size optionalinteger1–1000. Default 50.
list_calls({
  status: "completed",
  start_time_after: "2026-05-01T00:00:00Z",
  page_size: 100
})

list_recordings — recordings attached to a call

Returns SIDs, durations, and direct media URLs. The media URLs require your Twilio auth header to fetch — they're not public.

list_recordings({ call_sid: "CA94e1d8…3a02" })

// →
[{
  sid: "RE5b8c…",
  call_sid: "CA94e1d8…3a02",
  duration: "47",
  status: "completed",
  media_url: "https://api.twilio.com/.../Recordings/RE5b8c….mp3"
}]

transcribe_call — Deepgram-powered transcription

Pulls the audio and runs it through Deepgram. 30+ languages including Arabic, Spanish, Portuguese, Mandarin. Returns transcript, confidence, word-level timestamps, and detected language. Requires DEEPGRAM_API_KEY in env.

FieldTypeDescription
recording_sid requiredstringFrom list_recordings, e.g. RE5b8c….
language optionalstringISO 639-1 code: ar, en, es, etc. Pass auto to detect.
model optionalstringDeepgram model. Default nova-2.
diarize optionalbooleanDetect distinct speakers. Adds latency.
transcribe_call({
  recording_sid: "RE5b8c…",
  language: "ar"
})

// →
{
  recording_sid: "RE5b8c…",
  language: "ar",
  duration_seconds: 47,
  transcript: "أهلاً، الملعب بيفتح الساعة سبعة الصبح وبيقفل الساعة عشرة بالليل…",
  confidence: 0.91,
  word_count: 38
}

send_sms — SMS / MMS

Optional messaging_service_sid for sticky-sender behavior across countries; optional media_url for MMS attachments.

FieldTypeDescription
to requiredstringE.164.
body requiredstringSMS text. Auto-segments past 160 chars.
messaging_service_sid optionalstringUse a Messaging Service for routing.
media_url optionalstringImage / PDF URL for MMS.
status_callback optionalstringDelivery status callback URL.
send_sms({
  to: "+15555550100",
  body: "Reminder: 3pm appointment at Mansoura Stadium basketball court."
})

TTS voices — neural + standard

Twilio routes the voice parameter to Amazon Polly or Google TTS. Pick a neural voice when available — they're noticeably more natural.

VoiceLanguageNotes
Polly.Joanna-Neuralen-USDefault. Female, neural.
Polly.Matthew-Neuralen-USMale, neural.
Polly.Hala-Neuralar-EGEgyptian Arabic, neural. Strong for Cairo/Mansoura/Alexandria.
Polly.ZeinaarModern Standard Arabic.
Polly.Lucia-Neurales-ESCastilian Spanish.
Polly.Camila-Neuralpt-BRBrazilian Portuguese.
Google.en-US-Wavenet-Den-USGoogle Wavenet, male.

Inline TwiML — full control without webhooks

Pass raw TwiML XML in the twiml parameter when the prompt/record flow isn't enough — multi-step menus, DTMF input, conferencing, etc.

make_call({
  to: "+15555550100",
  twiml: `<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say voice="Polly.Joanna-Neural">Press 1 for hours, 2 for prices.</Say>
  <Gather numDigits="1" action="https://example.com/menu">
    <Say>Waiting...</Say>
  </Gather>
</Response>`
})

For multi-step flows you'll need a public callback (action="…"). For single-shot prompts, the built-in prompt + record covers most use cases.

Error handling — what goes wrong, and why

Every tool returns either a JSON payload or a structured MCP error with isError: true. The error message is the underlying Twilio (or Deepgram) error verbatim — easy to grep, easy to retry.

// Common shapes:
"Error: TwilioApiError: POST /Calls.json failed: { "code": 21211, "message": "Invalid 'To' Phone Number" }"
"Error: Deepgram transcribe failed (401): Invalid credentials"
"Error: Missing TWILIO_ACCOUNT_SID. Set it in your environment or Doppler."