Tools for Voice Agents
⚠️ Beta-Phase Feature
Voice Agent Tools are currently in beta. If you're interested in trying this feature, contact our support team.
Introduction
The Tools (tools) are extensions that allow your voice agents to perform actions during conversations, such as querying databases, scheduling meetings, updating CRM, checking product availability, and much more.
Main Benefits
🔧 Extensibility: Connect your agent to any external system
🤖 Intelligent automation: The agent decides when to use each tool
🔄 Real-time integration: Get updated data during the conversation
🎯 Customization: Create tools specific to your business
📊 Traceability: Log all tool calls for auditing
What is a Tool?
A Tool is a function that your voice agent can call during a conversation to:
Obtain information from external systems (databases, APIs, CRM)
Perform actions (create records, send emails, update data)
Make decisions based on real-time data
How It Works
Detailed flow:
The client speaks: "Do you have availability for Tuesday at 3pm?"
The agent analyzes: Detects that it needs to check availability
Calls your tool: Sends an HTTP request to your webhook with the parameters
Your system responds: Returns the requested information
The agent continues: "Yes, we have availability on Tuesday at 3pm. Would you like to schedule?"
Types of Tools
System Tools (SYSTEM)
They are predefined tools by Salescaling that are available to all agents:
🗓️ Calendar Scheduler: Schedule meetings in integrated calendars
📧 Email Sender: Send automatic emails
📝 Note Creator: Create notes in the CRM
ℹ️ Note: System tools cannot be edited or deleted. You can only view their configuration.
User Tools (USER)
They are custom tools that you create for your specific use case:
🔍 Check product availability
💰 Verify real-time prices
👤 Search customer information in CRM
📦 Check order status
✅ Validate promotional codes
🎫 Reserve tickets or services
Create a Tool
Step 1: Navigate to Tools
Go to Voice Agents in the main menu
Click on the tab Tools
Click on "Create tool"
Step 2: Basic Configuration
Name
The name should be descriptive and in English (snake_case):
💡 Tip: The name is used internally. Use clear names that describe the action.
Description
The description is crucial because the agent uses it to decide when to call the tool.
Best practices for descriptions:
Be specific about what the tool does
Mention what information it needs (parameters)
Indicate what information it returns
Use clear and direct language
Write in Spanish (the agent understands both languages)
Step 3: Configure the Webhook
Webhook URL
The URL of your endpoint that will receive the calls:
Requirements:
✅ Must be HTTPS (secure)
✅ Must be publicly accessible
✅ Must respond in less than 10 seconds
✅ Must return valid JSON
HTTP Method
Select the appropriate method:
GET: To query information without modifying data
POST: To create or modify data (recommended)
PUT: To update existing resources
PATCH: For partial updates
DELETE: To delete resources
💡 Recommendation: Use POST for most tools, as it allows sending complex parameters in the body.
Webhook Secret (Optional)
A secret that will be sent in the header X-Webhook-Secret to authenticate requests:
Recommended usage:
Step 4: Define Input Schema
The Input Schema defines which parameters the agent will send to your webhook.
Example: Product Availability Tool
Input Schema properties:
product_id
string
ID of the product to query
quantity
number
Desired quantity
location
string
Customer location (optional)
Request you will receive:
Supported Data Types
string: Text (names, IDs, descriptions)
number: Numbers (quantities, prices, numeric IDs)
ℹ️ Note: More types will be added soon (boolean, array, object).
Best Practices
✅ Use descriptive names in English (snake_case)
✅ Add clear descriptions to each property
✅ Include only necessary parameters
✅ Consider what information the agent can extract from the conversation
Step 5: Define Output Schema (Optional)
The Output Schema defines what information your webhook will return to the agent.
Is it Mandatory?
No, but it is highly recommended because:
📊 Documents what your tool returns
🤖 Helps the agent understand the response
🔍 Facilitates debugging
✅ Validates that the response is correct
Example: Availability Response
Output Schema properties:
available
string
"yes" or "no"
quantity
number
Available quantity
delivery_days
number
Days until delivery
message
string
Message for the customer
Response you should return:
Implement the Webhook
Request Structure
When the agent calls your tool, it sends a request with this structure:
Headers:
Body:
Implementation Example
Node.js (Express)
Python (Flask)
Error Handling
Your webhook must handle errors gracefully:
Golden rule: Always return a 200 status with a useful message for the customer, even when there are internal errors.
Assign Tools to Agents
Once the tool is created, you must assign it to the agents who will use it:
Step 1: Edit the Agent
Go to Voice Agents > Agents
Click on the agent you want to edit
Find the section "Tools"
Step 2: Select Tools
Click on "Add tool"
Select the tools you want to enable
Save the changes
Step 3: Update the Prompt (Important)
You must update the agent's prompt so it knows when to use each tool:
💡 Tip: Be explicit about when and how to use each tool. The agent will follow your instructions.
Usage Examples
Example 1: Check Product Availability
Conversation:
Tool Call:
Response:
Example 2: Schedule Meeting
Conversation:
Tool Call:
Response:
Example 3: Validate Promotional Code
Conversation:
Tool Call:
Response:
Testing and Debugging
Test your Tool
Create a test call:
Go to your agent
Click on "New call"
Use your own number to test
Mention the use case:
Say something that triggers the tool
Example: "Do you have product XYZ available?"
Check the logs:
Go to the completed conversation
Look for the "Tool Calls" section
Verify the request and response
Tool Calls Logs
Each call to a tool is logged with:
⏰ Timestamp: When it was called
📤 Request: Which parameters were sent
📥 Response: What your webhook returned
⏱️ Duration: How long it took
✅/❌ Status: Whether it succeeded or failed
Common Debugging
Error: "Tool call timeout"
Cause: Your webhook took more than 10 seconds to respond.
Solution:
Optimize database queries
Use caching for frequent data
Consider asynchronous responses
Error: "Invalid JSON response"
Cause: Your webhook did not return valid JSON.
Solution:
Error: "Webhook unreachable"
Cause: Your webhook is not publicly accessible.
Solution:
Check that the URL is correct
Make sure your server is running
Check the firewall and security rules
Use HTTPS, not HTTP
The agent does not call the tool
Cause: The prompt is not clear about when to use the tool.
Solution:
Update the prompt with explicit instructions
Mention the tool by name in the prompt
Give examples of when to use it
Best Practices
✅ Do
Fast responses: Optimize to respond in < 2 seconds
Clear messages: Return messages the agent can use directly
Error handling: Always return a helpful response, even on errors
Validation: Validate parameters before processing them
Logging: Log all calls for debugging
Idempotency: The same inputs should produce the same outputs
Documentation: Document what each tool does and how to use it
❌ Avoid
Long timeouts: Do not make requests that take > 10 seconds
Technical responses: Do not return technical error messages
Sensitive data: Do not include confidential information in responses
Undocumented side effects: Do not perform actions not described in the tool
External dependencies: Minimize calls to slow external APIs
Ambiguous responses: Be specific in your answers
Security
Authentication
Always validate the webhook secret:
Data Validation
Validate all received parameters:
Rate Limiting
Implement rate limiting to prevent abuse:
HTTPS Required
Always use HTTPS for your webhooks:
Current Limitations
Since this feature is in beta phase, keep in mind:
⚠️ Timeout: Tools must respond in < 10 seconds
🔢 Data types: Only string and number (more types coming soon)
📊 Calls per conversation: Maximum 10 tool calls per conversation
🌍 Languages: Optimized for Spanish and English
📝 Complex schemas: Arrays and nested objects coming soon
Frequently Asked Questions
How many tools can I create?
There is no limit to the number of tools you can create. However, we recommend keeping a manageable number (5-10) to ease maintenance.
Can I edit a tool after creating it?
Yes, you can edit any tool of type USER. Tools of type SYSTEM cannot be edited.
What happens if my webhook is down?
If your webhook does not respond, the agent will continue the conversation without the tool's information and will tell the customer it could not verify the information at that time.
Can I use the same tool in multiple agents?
Yes, you can assign the same tool to multiple agents. This is useful for generic tools like availability checks.
How do I know how many times my tool has been called?
You can view usage statistics for each tool on the Tools page. You can also review the logs of each individual conversation.
Can I pass additional context to my webhook?
Yes, each call includes an object context with call information (call_id, agent_id, customer_phone, etc.) that you can use for logging or personalization.
What happens if I return an incorrect format?
If your response does not match the defined output schema, the agent will try to interpret the response as best as possible. However, it is recommended to always follow the defined schema.
Can I make one tool call another tool?
Not directly. Each tool is independent. If you need to chain actions, you must do so in your webhook before returning the response.
How can I test my webhook locally?
You can use tools like ngrok to expose your local server with a temporary public URL:
Do tools work in all languages?
Yes, tools work regardless of the agent's language. Parameters are extracted from the conversation in any supported language.
Support
If you need help with Tools:
📧 Email: [email protected]
💬 Live chat: Available on the platform
📚 Documentation: docs.salescaling.com
🔗 API Reference: Webhooks API
Related Resources
Last updated
Was this helpful?
