Custom Mid-Call Tools

Custom tools allow your assistant to communicate with the outside world in real-time. By configuring a custom tool, you can enable your assistant to push data to your CRM, retrieve order statuses, or trigger workflows in automation platforms like Make or Zapier.

The Configuration Structure

To create a custom tool, go to the Tools tab in your Assistant settings and select "Create Custom Tool." You will need to define the following:

1. Tool Definition

This tells the AI what the tool is and when to use it.

2. API Configuration

This tells Caller AI where to send the data.

3. Parameters (The Payload)

You must define what data the AI needs to extract from the conversation to send to your tool. This is defined in JSON Schema format.

Example Schema: Scheduling an Appointment
{
  "type": "object",
  "properties": {
    "customer_name": {
      "type": "string",
      "description": "The name of the caller"
    },
    "appointment_date": {
      "type": "string",
      "description": "The date requested in YYYY-MM-DD format"
    },
    "appointment_time": {
      "type": "string",
      "description": "The time requested (e.g., 2pm)"
    }
  },
  "required": ["customer_name", "appointment_date", "appointment_time"]
}
            

Handling the Response

When the tool executes, your server (or webhook) must send a response back. The AI will read this response to know what to say next.

The Response Cycle

  1. AI sends: `{"customer_name": "John", "appointment_date": "2024-10-10"}`
  2. Your Server processes: Checks database, books slot.
  3. Your Server responds: `{"status": "success", "message": "Appointment confirmed for October 10th."}`
  4. AI Speaks: "Great! I have confirmed your appointment for October 10th."
Tip: Instructing the AI on Responses In your System Prompt, add a line like:
"When you use the book_appointment tool, wait for the confirmation message and read it back to the user clearly."

Common Use Cases