Update Voice Agent Tools
AI Agents
Update Voice Agent Tools
Update tools for voice agents to enable function calling, API integrations, transfers, and more
PATCH
Update Voice Agent Tools
Overview
Voice agents can be enhanced with tools that enable advanced functionality during calls:- End calls gracefully when objectives are met
- Transfer calls to human agents or phone numbers
- Integrate with external APIs (CRM, databases, etc.)
- Book appointments via Cal.com
- Send SMS messages during calls
- Transfer to other AI agents for specialized handling
- Extract and save conversation data
- Navigate IVR systems with DTMF
- And more!
Tools are only supported for voice agents. SMS agents do not support tools.
Authentication
Your Teli API key
Path Parameters
The unique identifier of the voice agent to update
Request Body
Array of tool configurations. Each tool must have
type, name, and type-specific fields.Supported Tool Types
1. End Call
End the conversation gracefully when objectives are met.Must be
"end_call"Unique tool name (snake_case, a-z, 0-9, underscores only)
What the tool does and when to use it
2. Transfer Call
Transfer the call to a human agent or phone number.Where to transfer the callProperties:
type: Must be"predefined"number: Phone number in E.164 format (e.g.,"+15551234567")extension(optional): Extension digits (e.g.,"123")
How to transfer the callProperties:
type:"cold_transfer"(immediate) or"warm_transfer"(AI introduces)on_hold_music(warm only):"none","relaxing_sound","uplifting_beats","ringtone"show_transferee_as_caller(optional): Show caller’s number to transfer destination
3. Custom API Integration
Integrate with any external API (CRM, databases, order systems, etc.)API endpoint URL. Supports dynamic variables:
{{variable_name}}HTTP method:
"GET", "POST", "PUT", "PATCH", or "DELETE"HTTP headers (e.g., authorization, content-type)
Query parameters to append to URL
Whether AI should speak the result after API call completes
4. Check Calendar Availability (Cal.com)
Check available time slots in Cal.com calendar.Cal.com API key (get from Cal.com dashboard → Settings → Developer → API Keys)
Cal.com event type ID (found in event type URL)
IANA timezone (e.g.,
"America/New_York", "Europe/London"). If not specified, uses caller’s timezone or server default.5. Book Appointment (Cal.com)
Book appointments directly via Cal.com.Cal.com API key
Cal.com event type ID
IANA timezone for booking
6. Agent Transfer
Transfer conversation to another AI agent (not a phone transfer).ID of the target AI agent to transfer to
"both_agents" or "only_destination_agent"Specific version of target agent. If not specified, uses latest.
Agent Transfer vs Phone Transfer: Agent transfer switches AI handlers instantly with full conversation history, while phone transfer creates a new phone call. Agent transfer is faster and more reliable.
7. Send SMS
Send one-way SMS message during voice call.SMS message configurationFor predefined messages:
type:"predefined"content: The message text (supports dynamic variables like{{name}})
type:"inferred"prompt: Instructions for AI to generate the message
8. Extract Dynamic Variables
Extract and save conversation data as variables for later use.Variables to extract. Each variable has:
type:"string","number","enum", or"boolean"name: Variable name (snake_case)description: What to extractchoices(for enum): Array of possible valuesexamples(optional): Example values to guide AI
9. Press Digit (DTMF)
Press phone keypad digits for IVR navigation.Delay in milliseconds before pressing digit (default: 1000ms, max: 5000ms)
Useful for navigating automated phone systems and IVR menus.
10. MCP (Model Context Protocol)
Connect to MCP servers for advanced integrations.Unique ID of the MCP server configuration
MCP tools require prior MCP server configuration. Contact support for setup assistance.
Request Examples
Update with Single Tool
Update with Multiple Tools
Healthcare Appointment Example
Sales Bot Example
Response
Success Response
Indicates successful update
The agent’s unique identifier
Number of tools configured
Success message
Platform identifier
Error Responses
Tool Naming Requirements
Dynamic Variables
Many tools support dynamic variables that get substituted at runtime from the conversation:{{first_name}},{{last_name}},{{customer_name}}{{phone_number}},{{email}}{{order_id}},{{appointment_date}},{{appointment_time}}- Custom variables extracted during conversation
Best Practices
1. Tool Descriptions
Write clear descriptions that tell the AI when to use the tool:2. Tool Combinations
Combine tools for powerful workflows: Support Bot:check_order_status(Custom API)transfer_to_support(Transfer)end_call(End Call)
check_availability_cal(Check Calendar)book_appointment_cal(Book Appointment)send_confirmation(Send SMS)end_call(End Call)
check_inventory(Custom API)create_quote(Custom API)send_quote(Send SMS)transfer_to_sales_rep(Transfer)end_call(End Call)
3. Error Handling
Tools can timeout or fail. Include fallback instructions in your agent prompt:4. Tool Naming
Use descriptive, action-oriented names:- ✅
check_order_status - ✅
book_appointment - ✅
transfer_to_support - ❌
tool1 - ❌
api_call - ❌
function
Common Use Cases
Customer Support
Healthcare
Sales & Lead Qualification
Appointment Scheduling
Response Examples
Successful Update
Error: Not a Voice Agent
Tools are only available for voice agents. SMS agents use different mechanisms for automation.
Error: Agent Not Found
Error: Invalid Tool Configuration
Check tool names follow naming requirements (snake_case, no spaces). Our API auto-sanitizes names, but proper formatting helps prevent issues.
Tool Lifecycle
Creating Agent with Tools
Updating Tools
Getting Tools
Limitations & Notes
Performance Tips:
- Fewer tools = Better AI performance - Only add tools you actually need
- Clear descriptions - Help AI understand when to use each tool
- Tool order doesn’t matter - AI selects appropriate tool based on conversation
- Test thoroughly - Test each tool in various conversation scenarios
Advanced Features
Warm Transfer Options
Warm transfers support additional configuration:Music while caller is on hold:
"none"- No music"relaxing_sound"- Calm background music"uplifting_beats"- Energetic music"ringtone"- Standard ringtone
If true, shows caller’s number to transfer destination (requires telephony support)
Maximum time to wait for human detection (default: 30000ms)
Custom API Advanced
Extract values from API response as dynamic variables for later use.
Key: variable name, Value: JSON path in response
Whether AI speaks while API call is in progress
What AI should say during execution (only if
speak_during_execution: true)API call timeout in milliseconds (1000-600000, default: 120000)
Testing Tools
Test in Sandbox
- Create test agent with tools
- Make test calls
- Trigger each tool
- Verify behavior
- Check logs for tool execution
Monitor Tool Usage
- View call logs to see which tools were triggered
- Check call analysis for tool execution details
- Review conversation transcripts for context
Troubleshooting
Tool Not Triggering
Problem: AI doesn’t use the tool during calls Solutions:- Improve description - Be specific about when to use
- Update prompt - Explicitly mention tool in agent prompt
- Reduce tool count - Too many tools confuses AI
- Test prompt - Include example scenario
API Tool Errors
Problem: Custom API tool returns errors Solutions:- Verify URL - Check API endpoint is correct
- Check headers - Ensure authorization is valid
- Test endpoint - Call API directly to verify
- Check timeout - Increase
timeout_msif needed
Transfer Fails
Problem: Call transfer doesn’t complete Solutions:- Verify number - Check E.164 format (+15551234567)
- Check telephony - Ensure transfer is supported
- Try cold transfer - If warm transfer fails
- Check extension - Validate extension digits
Rate Limits
No specific rate limits on tool updates, but:
- Avoid updating same agent tools repeatedly in quick succession
- Batch your tool changes (update all at once)
- Cache tool configurations client-side when possible
Related Endpoints
- Create Agent - Create agent with initial tools
- Get Agent - Retrieve agent with current tools
- Update Agent - Update agent configuration
- List Agents - List all agents
Support
Need help with tools?- Check our agent creation guide
- View example implementations
- Contact Teli support for advanced use cases
Ready to enhance your voice agents with powerful tools! 🚀

