firefly_0206
03/21/2025, 12:52 AMfirefly_0206
03/21/2025, 1:02 AMKyle
03/22/2025, 7:18 AM[1] you need to add its usage purpose and expected input parameters inside the tool description. Also, add some description to the input parameters. Ensure the description you add is similar to the call transfer so that the higher similarity score the LLM invokes your tool with the required parameters.
Now, the `[2]`second thing inside your prompt where you trigger this tool call. You have to trigger the tool call by listing the tool name with the parameters you want to pass through the tool. example trigger the toolName with parameter1, param2, ..., paramN
These two changes will ensure your tools are always called with the required parameters. Make these changes and let me know how this goes for you?Shubham Bajaj
03/22/2025, 7:21 AM{
"tools": [
{
"type": "function",
"function": {
"name": "sendCustomerNotification",
"description": "Sends an email notification containing customer information collected during the call. This tool ensures all customer details are properly formatted and delivered to the client. Use this whenever customer information needs to be forwarded to the client's system.",
"parameters": {
"type": "object",
"properties": {
"customerName": {
"type": "string",
"description": "The full name of the customer (first and last name) as provided during the call"
},
"customerEmail": {
"type": "string",
"description": "The valid email address provided by the customer for contact purposes"
},
"customerPhone": {
"type": "string",
"description": "The phone number provided by the customer in format: +1XXXXXXXXXX"
},
"inquiryDetails": {
"type": "string",
"description": "A detailed summary of what the customer is inquiring about or interested in"
},
"callId": {
"type": "string",
"description": "The unique identifier for this call in the Vapi system"
},
"urgencyLevel": {
"type": "string",
"enum": [
"low",
"medium",
"high",
"urgent"
],
"description": "How quickly the client should follow up based on customer's stated timeframe"
}
},
"required": [
"customerName",
"customerEmail",
"inquiryDetails",
"callId"
]
}
}
}
]
}
## 2. Tool Call Trigger in Your Prompt:
When a customer provides their contact information and inquiry details, you should always capture and store this information. Once you have collected all the necessary customer details, trigger the sendCustomerNotification tool with customerName, customerEmail, customerPhone, inquiryDetails, callId, and urgencyLevel.
For example, if John Smith calls asking about premium services, you would:
1. Collect his information during the conversation
2. Before ending the call, you would send the notification by thinking: "I need to send this customer information to the client system"
3. Then trigger the sendCustomerNotification tool with customerName: "John Smith", customerEmail: "john.smith@example.com", customerPhone: "+14155552671", inquiryDetails: "Interested in premium service package with additional support options", callId: "[current_call_id]", urgencyLevel: "high"