Built-in Tools Reference

Complete reference for every tool available to your voice agents during live calls.

Table of Contents

  1. Overview
  2. transferCall — Transfer to human / phone number
  3. endCall — End the call
  4. dtmfInput — Send touch-tone digits
  5. sendSMS — Send a text message
  6. pauseRecording — Pause call recording
  7. resumeRecording — Resume call recording
  8. leaveVoicemail — Leave a voicemail
  9. addCallTag — Tag / categorize the call
  10. switchLanguage — Change language mid-call
  11. setDisposition — Set call outcome code
  12. 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:

Tip: Built-in tools work alongside any custom tools you define in your agent config or attach via a 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

NameTypeRequiredDescription
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

  1. Resolves the destination: if "default" or omitted, uses the agent's transfer_number from config.
  2. Sets the call state to transferring.
  3. Fires a status-update webhook event with { status: "transferring", destination, mode }.
  4. Uses the Twilio REST API to redirect the call to the transfer webhook endpoint.
  5. Disconnects STT and TTS — Twilio handles the rest of the call.
  6. Transfer mode (warm or cold) is determined by the agent's transfer_mode setting (defaults to warm).

Agent Config Required

ColumnTypeDefaultDescription
transfer_numberTEXTNULLThe default phone number to transfer to. Must be set or the tool will return an error when destination is "default".
transfer_modeTEXT'warm''warm' (announced) or 'cold' (blind transfer).
Warning: If no 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

NameTypeRequiredDescription
reason string Yes Why the call is ending. Logged for analytics. Examples: "caller said goodbye", "task completed", "caller requested to end".

What It Does

  1. Logs the end reason.
  2. Waits 4 seconds to allow the agent's final spoken response to finish playing.
  3. Calls cleanup() with the agent-hangup end reason, which disconnects STT/TTS, saves the call log, runs call analysis, and fires the end-of-call-report webhook.
Tip: The 4-second delay is intentional. It gives the TTS engine time to finish speaking the agent's goodbye message before the call drops. You do not need to add a manual delay in your system prompt.

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

NameTypeRequiredDescription
digits string Yes The digits to send. Valid characters: 0-9, *, #. Example: "1", "1234#", "*67".

What It Does

  1. Sends the digits via the Twilio REST API using TwiML <Play digits="...">.
  2. Reconnects the media stream after digit playback so the conversation can continue.
Warning: DTMF is sent via a Twilio call update, which briefly interrupts the media stream. The stream is reconnected automatically, but there may be a short gap in audio. This is a Twilio platform limitation.

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

NameTypeRequiredDescription
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

  1. Resolves the recipient: if "caller" or omitted, sends to the caller (inbound) or the called party (outbound).
  2. Sends the SMS via Twilio from the agent's phone number.
  3. Tracks SMS cost: base rate + carrier surcharge, calculated per 160-character segment.
  4. Logs usage and deducts from the organization's credit balance.
Tip: SMS costs are tracked per segment (160 characters each). A 320-character message counts as 2 segments. Keep messages concise to minimize cost.

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

NameTypeRequiredDescription
reason string Yes Why recording is being paused. Logged for audit. Example: "collecting credit card number", "collecting SSN".

What It Does

  1. Checks that an active Twilio recording exists (recordingSid must be set).
  2. Calls the Twilio REST API to set the recording status to paused.
  3. Sets an internal recordingPaused flag to prevent double-pausing.
  4. Returns an error if no recording is active or the recording is already paused.
Warning: This tool only works when 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

ColumnTypeDefaultDescription
enable_recordingBOOLEANfalseMust 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

  1. Checks that an active Twilio recording exists and is currently paused.
  2. Calls the Twilio REST API to set the recording status back to in-progress.
  3. Clears the internal recordingPaused flag.
  4. Returns an error if no recording is active or the recording is not currently paused.
Tip: Always pair 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

NameTypeRequiredDescription
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:

  1. 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.
  2. Live TTS: If no pre-generated audio exists but voicemail_message is configured on the agent, the message is spoken via the live TTS engine, then the call ends after 5 seconds.
  3. 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

ColumnTypeDefaultDescription
voicemail_messageTEXTNULLCustom voicemail script spoken via TTS when no pre-generated audio file exists. If not set, the generic fallback is used.
enable_voicemail_detectionBOOLEANtrueWhether 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

NameTypeRequiredDescription
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

  1. Normalizes the tag: lowercases, trims whitespace, replaces spaces with hyphens.
  2. Checks for duplicates — if the tag already exists on this call, returns early.
  3. Appends to the in-memory callTags array.
  4. Immediately persists to the database by updating call_logs.tags (stored as JSON).
  5. Tags are indexed with a GIN index for fast querying and filtering in analytics.
Tip: The system prompt automatically instructs agents to add tags silently. The AI will not announce to the caller that it is tagging the call. You can add additional tagging instructions in your custom system prompt for domain-specific tags.

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

NameTypeRequiredDescription
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

CodeLanguageCodeLanguage
enEnglishjaJapanese
esSpanishzhChinese
frFrenchkoKorean
deGermannlDutch
ptPortuguese (BR)plPolish
itItalianruRussian
hiHindisvSwedish
arArabiccsCzech
trTurkishroRomanian

What It Does

  1. Maps the language code to the appropriate Deepgram STT model code (e.g., pt maps to pt-BR).
  2. Switches the STT provider's language via stt.switchLanguage().
  3. Updates config.language and config.sttLanguage for subsequent TTS calls.
  4. Speaks the provided confirmation message in 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

NameTypeRequiredDescription
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

  1. Validates the disposition against the agent's configured dispositions array. Returns an error listing valid options if invalid.
  2. Sets this.disposition on the call session.
  3. Immediately persists to the call_logs.disposition column in the database.
  4. Only one disposition can be set per call (last one wins if called multiple times).

Agent Config Required

ColumnTypeDefaultDescription
dispositionsJSONB'[]'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.
Warning: If 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

  1. 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."
  2. 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."
  3. 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."
  4. Always pair pause/resume. If your agent collects sensitive data, always instruct it to resume recording afterward. A forgotten resumeRecording means the rest of the call is not recorded.
  5. Use concrete examples. Instead of "tag the call appropriately", list the specific tags: "Use these tags: appointment-booked, callback-requested, not-interested, wrong-number."
  6. 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
Tip: This example defines clear triggers for each tool, lists the exact tag and disposition values, and tells the agent what to say before using tools like sendSMS. This level of specificity leads to reliable tool usage in production.

Tool Execution Flow

Understanding the execution flow helps you write better prompts:

  1. The AI generates a spoken response and a tool call in the same turn.
  2. The spoken text is streamed to TTS and played to the caller.
  3. The tool executes (e.g., SMS is sent, tag is saved, call is transferred).
  4. The tool result is sent back to the AI as context.
  5. The AI may generate a follow-up response based on the result (e.g., "I've sent you a text with the details").
  6. If the tool was endCall or transferCall, 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