Built-in Tools Reference
Complete reference for every tool available to your voice agents during live calls.
Table of Contents
- Overview
- transferCall — Transfer to human / phone number
- endCall — End the call
- dtmfInput — Send touch-tone digits
- sendSMS — Send a text message
- pauseRecording — Pause call recording
- resumeRecording — Resume call recording
- leaveVoicemail — Leave a voicemail
- addCallTag — Tag / categorize the call
- switchLanguage — Change language mid-call
- setDisposition — Set call outcome code
- Instructing Your Agent to Use Tools
Overview
Every agent on the EWT Voice Agent platform automatically receives a set of built-in tools. These tools let the AI take real-world actions during a live phone call — transfer the caller, send an SMS, pause recording for HIPAA compliance, and more. No custom webhook server is required; the platform handles execution internally.
Built-in tools fall into two categories:
- Always Available — Included on every call automatically.
- Conditional — Only added when the agent has the required configuration (e.g.,
setDispositionrequires a dispositions array).
server_url webhook. They share the same tool-call pipeline and appear together in call logs.
1. transferCall
transferCall Always Available
Transfer the current call to a human agent or an external phone number. Supports both warm (announced) and cold (blind) transfers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
destination |
string | No | Phone number in E.164 format (e.g., +15551234567), or "default" to use the agent's configured transfer number. If omitted, falls back to the configured number. |
message |
string | Yes | Brief message spoken to the caller before the transfer begins. |
What It Does
- Resolves the destination: if
"default"or omitted, uses the agent'stransfer_numberfrom config. - Sets the call state to
transferring. - Fires a
status-updatewebhook event with{ status: "transferring", destination, mode }. - Uses the Twilio REST API to redirect the call to the transfer webhook endpoint.
- Disconnects STT and TTS — Twilio handles the rest of the call.
- Transfer mode (
warmorcold) is determined by the agent'stransfer_modesetting (defaults towarm).
Agent Config Required
| Column | Type | Default | Description |
|---|---|---|---|
transfer_number | TEXT | NULL | The default phone number to transfer to. Must be set or the tool will return an error when destination is "default". |
transfer_mode | TEXT | 'warm' | 'warm' (announced) or 'cold' (blind transfer). |
transfer_number is configured on the agent and the AI calls this tool with destination: "default" (or omits destination), the tool returns { success: false, error: "No transfer number configured" }. Always set a transfer number in the dashboard if your agent should be able to transfer calls.
System Prompt Example
If the caller asks to speak with a manager or says they need
a real person, use the transferCall tool. Say something like
"Sure, let me connect you with someone who can help" as the
message. Use destination "default" unless the caller gives
you a specific number.
Common Use Case
A receptionist agent that handles simple questions but transfers to a human for complex issues, scheduling, or when explicitly requested.
2. endCall
endCall Always Available
End the current call. The agent should use this when the conversation reaches a natural conclusion.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
reason |
string | Yes | Why the call is ending. Logged for analytics. Examples: "caller said goodbye", "task completed", "caller requested to end". |
What It Does
- Logs the end reason.
- Waits 4 seconds to allow the agent's final spoken response to finish playing.
- Calls
cleanup()with theagent-hangupend reason, which disconnects STT/TTS, saves the call log, runs call analysis, and fires theend-of-call-reportwebhook.
System Prompt Example
When the caller says goodbye, thanks you, or indicates
they're done, use the endCall tool. Say a natural goodbye
like "Great talking with you, have a good one!" and set the
reason to describe why the call ended.
Common Use Case
Every agent should allow natural call endings. Without this tool, calls only end via customer hangup, max duration timeout, or idle timeout.
3. dtmfInput
dtmfInput Always Available
Send DTMF touch-tone digits (keypad presses). Used when the agent needs to navigate phone menus or IVR systems during outbound calls.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
digits |
string | Yes | The digits to send. Valid characters: 0-9, *, #. Example: "1", "1234#", "*67". |
What It Does
- Sends the digits via the Twilio REST API using TwiML
<Play digits="...">. - Reconnects the media stream after digit playback so the conversation can continue.
System Prompt Example
You are calling a pharmacy's automated system. When you hear
"Press 1 for prescriptions, press 2 for store hours", use
the dtmfInput tool to press the appropriate key. Listen
carefully to the menu options before pressing.
Common Use Case
Outbound agents that call businesses and need to navigate automated phone trees (e.g., "Press 1 for sales, press 2 for support") before reaching a human.
4. sendSMS
sendSMS Always Available
Send an SMS text message during or after the call. Can text the current caller or any phone number.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
to |
string | No | Phone number in E.164 format, or "caller" to send to the person on the call. If omitted, defaults to the caller's number. |
message |
string | Yes | The text message content to send. |
What It Does
- Resolves the recipient: if
"caller"or omitted, sends to the caller (inbound) or the called party (outbound). - Sends the SMS via Twilio from the agent's phone number.
- Tracks SMS cost: base rate + carrier surcharge, calculated per 160-character segment.
- Logs usage and deducts from the organization's credit balance.
System Prompt Example
After confirming an appointment, use the sendSMS tool to text
the caller a confirmation. Set "to" to "caller" and include
the date, time, and address in the message. Always tell the
caller "I'll text you the details" before sending.
Common Use Case
Sending appointment confirmations, links, addresses, reference numbers, or any information that is easier to read than hear over the phone.
5. pauseRecording
pauseRecording Always Available
Pause the call recording. Use before collecting sensitive information (credit card numbers, SSNs, medical data) to maintain HIPAA, PCI-DSS, or general privacy compliance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
reason |
string | Yes | Why recording is being paused. Logged for audit. Example: "collecting credit card number", "collecting SSN". |
What It Does
- Checks that an active Twilio recording exists (
recordingSidmust be set). - Calls the Twilio REST API to set the recording status to
paused. - Sets an internal
recordingPausedflag to prevent double-pausing. - Returns an error if no recording is active or the recording is already paused.
enable_recording is set to true on the agent. If recording is not enabled, there is no active recording to pause, and the tool returns { error: "No active recording to pause" }.
Agent Config Required
| Column | Type | Default | Description |
|---|---|---|---|
enable_recording | BOOLEAN | false | Must be true for recording (and therefore pause/resume) to work. |
System Prompt Example
Before asking for any credit card number, social security
number, or insurance ID, ALWAYS use pauseRecording first.
Tell the caller: "For your security, I'm pausing the
recording while you share that information."
Common Use Case
HIPAA-compliant healthcare agents, PCI-compliant payment collection, or any scenario where sensitive PII must not appear in call recordings.
6. resumeRecording
resumeRecording Always Available
Resume the call recording after it was paused. Must be called after sensitive information collection is complete.
Parameters
None. This tool takes no input parameters.
What It Does
- Checks that an active Twilio recording exists and is currently paused.
- Calls the Twilio REST API to set the recording status back to
in-progress. - Clears the internal
recordingPausedflag. - Returns an error if no recording is active or the recording is not currently paused.
pauseRecording and resumeRecording. If you forget to resume, the rest of the call will not be recorded. Include explicit instructions in your system prompt to resume after collecting sensitive data.
System Prompt Example
After the caller finishes providing their credit card or SSN,
use resumeRecording immediately. Say "Thank you, the
recording is back on" so the caller knows.
Common Use Case
Always used as the counterpart to pauseRecording. The pair creates a "recording gap" around sensitive data collection.
7. leaveVoicemail
leaveVoicemail Always Available
Leave a voicemail message when the agent detects it has reached a voicemail system. The agent uses contextual clues (hearing "leave a message", "after the beep", etc.) to decide when to trigger this tool.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
detected_reason |
string | Yes | Why the agent believes this is a voicemail. Example: "heard leave a message after the beep", "long silence followed by beep tone". |
What It Does
The handler attempts three methods in priority order:
- Pre-generated audio: If a pre-generated voicemail audio file exists for the agent (at
voicemail-audio/{agentId}.mp3), it redirects the Twilio call to a voicemail webhook that plays the MP3. - Live TTS: If no pre-generated audio exists but
voicemail_messageis configured on the agent, the message is spoken via the live TTS engine, then the call ends after 5 seconds. - Generic fallback: If neither is available, a generic message is spoken: "Hey [name], just giving you a call. Give me a ring back when you get a chance."
After the voicemail plays, the call ends with the voicemail-left end reason.
Agent Config Required
| Column | Type | Default | Description |
|---|---|---|---|
voicemail_message | TEXT | NULL | Custom voicemail script spoken via TTS when no pre-generated audio file exists. If not set, the generic fallback is used. |
enable_voicemail_detection | BOOLEAN | true | Whether voicemail detection is active. When true, the system prompt instructs the agent to watch for voicemail cues. |
System Prompt Example
If you detect that you have reached a voicemail system --
for example you hear "please leave a message", "not
available", "after the beep", or a long silence followed by
a beep -- immediately use the leaveVoicemail tool. Set
detected_reason to describe what you heard.
Common Use Case
Outbound sales or appointment reminder agents that call contacts who may not answer. The agent detects voicemail and leaves a consistent, professional message every time.
8. addCallTag
addCallTag Always Available
Tag the current call with a label for categorization and analytics. Multiple tags can be added to a single call. Tags are persisted to the call_logs table immediately.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tag |
string | Yes | The tag to add. Should be lowercase with hyphens for spaces. Examples: "sales-qualified", "support-ticket", "appointment-booked", "callback-requested", "not-interested". |
What It Does
- Normalizes the tag: lowercases, trims whitespace, replaces spaces with hyphens.
- Checks for duplicates — if the tag already exists on this call, returns early.
- Appends to the in-memory
callTagsarray. - Immediately persists to the database by updating
call_logs.tags(stored as JSON). - Tags are indexed with a GIN index for fast querying and filtering in analytics.
System Prompt Example
Tag every call based on the outcome:
- "appointment-booked" if an appointment is scheduled
- "callback-requested" if the caller wants a callback
- "sales-qualified" if the caller is a potential customer
- "not-interested" if they decline
- "wrong-number" if they say you have the wrong number
Add tags silently. Never tell the caller you are tagging.
Common Use Case
Categorizing calls for reporting dashboards: filter by tag to see how many calls were sales-qualified, how many appointments were booked, etc.
9. switchLanguage
switchLanguage Always Available
Change the conversation language mid-call. Switches both the STT (speech-to-text) language model and the agent's response language.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
language |
string | Yes | Language code. See supported languages below. |
message |
string | Yes | A confirmation message spoken in the new language. Example for Spanish: "Claro, vamos a continuar en espanol." |
Supported Languages
| Code | Language | Code | Language |
|---|---|---|---|
en | English | ja | Japanese |
es | Spanish | zh | Chinese |
fr | French | ko | Korean |
de | German | nl | Dutch |
pt | Portuguese (BR) | pl | Polish |
it | Italian | ru | Russian |
hi | Hindi | sv | Swedish |
ar | Arabic | cs | Czech |
tr | Turkish | ro | Romanian |
What It Does
- Maps the language code to the appropriate Deepgram STT model code (e.g.,
ptmaps topt-BR). - Switches the STT provider's language via
stt.switchLanguage(). - Updates
config.languageandconfig.sttLanguagefor subsequent TTS calls. - Speaks the provided confirmation
messagein the new language.
System Prompt Example
If the caller begins speaking Spanish or asks "habla
espanol?", use the switchLanguage tool with language "es" and
a confirmation message in Spanish like "Claro, continuamos
en espanol. Como le puedo ayudar?" Then continue the
conversation entirely in Spanish.
Common Use Case
Multilingual support lines where a single agent handles callers in different languages. The agent detects the caller's language and seamlessly switches.
10. setDisposition
setDisposition Conditional
Set the call's disposition (outcome code). This tool is only available when the agent has a dispositions array configured. The disposition is validated against that list.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
disposition |
string (enum) | Yes | The disposition code. Must be one of the values in the agent's dispositions array. Example: "sale-completed", "no-answer", "voicemail". |
What It Does
- Validates the disposition against the agent's configured
dispositionsarray. Returns an error listing valid options if invalid. - Sets
this.dispositionon the call session. - Immediately persists to the
call_logs.dispositioncolumn in the database. - Only one disposition can be set per call (last one wins if called multiple times).
Agent Config Required
| Column | Type | Default | Description |
|---|---|---|---|
dispositions | JSONB | '[]' | Array of valid disposition strings. Example: ["sale-completed", "appointment-set", "not-interested", "callback", "no-answer", "voicemail"]. The tool is only added to the agent's tools when this array has at least one entry. |
dispositions is empty or not configured, this tool will not appear in the agent's tool list at all. The AI cannot call a tool that does not exist in its tool definitions.
System Prompt Example
Before ending the call, use setDisposition to record the
outcome. Choose the most appropriate option:
- "sale-completed" if a purchase was made
- "appointment-set" if an appointment was booked
- "not-interested" if the caller declined
- "callback" if they want to be called back
Set the disposition silently. Do NOT ask the caller what
the disposition should be.
Common Use Case
Sales teams that need structured outcome tracking. Dispositions feed into CRM integrations and reporting dashboards to track conversion rates, callback queues, and agent performance.
Instructing Your Agent to Use Tools
The AI decides when to use a tool based on the tool's description field and your system prompt. The built-in tool descriptions are already well-written, but adding explicit instructions in your system prompt dramatically improves reliability.
Best Practices
- Be explicit about triggers. Instead of "transfer when appropriate", write "transfer when the caller asks for a manager, says 'let me talk to someone', or when you cannot answer their question."
- Pair tools with spoken responses. The platform instructs agents to say something natural before executing a tool. Reinforce this: "Always tell the caller what you're doing before transferring or sending an SMS."
- Keep tags and dispositions silent. The platform auto-injects instructions to add tags and set dispositions without telling the caller. Do not override this — callers should not hear "I'm tagging this call as sales-qualified."
-
Always pair pause/resume. If your agent collects sensitive data, always instruct it to resume recording afterward. A forgotten
resumeRecordingmeans the rest of the call is not recorded. - Use concrete examples. Instead of "tag the call appropriately", list the specific tags: "Use these tags: appointment-booked, callback-requested, not-interested, wrong-number."
- Order matters. Place tool instructions after identity and greeting instructions but before conversation rules. The AI prioritizes instructions that appear earlier in context.
Complete Example: Receptionist Agent
The following system prompt demonstrates an agent that uses transferCall, addCallTag, sendSMS, and setDisposition together.
You are Jessica, a friendly receptionist at Lakewood Dental.
You answer inbound calls, help callers with scheduling, answer
basic questions about services and hours, and transfer to a
team member when needed.
OFFICE INFORMATION:
- Hours: Monday-Friday 8am-5pm, Saturday 9am-1pm, closed Sunday
- Address: 742 Lakewood Blvd, Suite 200, Austin TX 78701
- Services: cleanings, fillings, crowns, root canals, whitening,
Invisalign, emergency dental
- New patient forms: https://lakewooddental.com/new-patient
TOOL USAGE:
Transfer calls:
- If the caller asks to speak with a dentist, hygienist, or
office manager, use transferCall with destination "default"
and a friendly message like "Sure, let me get them for you."
- If you cannot answer a clinical question, transfer rather
than guessing.
Send SMS:
- After booking an appointment, text the caller a confirmation:
"Your appointment at Lakewood Dental is confirmed for
[date] at [time]. Address: 742 Lakewood Blvd, Suite 200,
Austin TX 78701."
- If a caller is a new patient, text them the forms link:
"Welcome to Lakewood Dental! Please fill out your new
patient forms before your visit:
https://lakewooddental.com/new-patient"
- Always say "I'll text you that info" before using sendSMS.
Call tags (add silently, never tell the caller):
- "appointment-booked" -- caller scheduled an appointment
- "new-patient" -- caller is a new patient
- "billing-question" -- caller asked about insurance or billing
- "emergency" -- caller has a dental emergency
- "transferred" -- call was transferred to a team member
- "general-inquiry" -- basic hours/services/location question
Dispositions (set before ending the call, do NOT tell the caller):
- "appointment-set" -- appointment was successfully booked
- "transferred" -- caller was transferred to a team member
- "info-provided" -- caller's question was answered, no appointment
- "callback-requested" -- caller wants someone to call them back
- "no-action" -- caller hung up or no action was needed
CONVERSATION STYLE:
- Warm, professional, and concise
- Use the caller's name if they provide it
- Keep responses to 1-2 sentences -- this is a phone call
- If unsure about availability, say "Let me check on that"
and then transfer to the office manager
sendSMS. This level of specificity leads to reliable tool usage in production.
Tool Execution Flow
Understanding the execution flow helps you write better prompts:
- The AI generates a spoken response and a tool call in the same turn.
- The spoken text is streamed to TTS and played to the caller.
- The tool executes (e.g., SMS is sent, tag is saved, call is transferred).
- The tool result is sent back to the AI as context.
- The AI may generate a follow-up response based on the result (e.g., "I've sent you a text with the details").
- If the tool was
endCallortransferCall, the pipeline stops after step 3 — no follow-up is needed.
All tool calls are logged in the toolCallLog array and included in the end-of-call report and tool-calls webhook event.
Last updated: February 2026 • EWT Voice Agent Platform