Create a Custom Tool that can take AI input and call external APIs.
Speak
, Wait
, Transfer
and Finish
- Custom Tools cannot share these names.We’ve made a list of reserved words that can confuse the AI that cannot be included:input
speak
transfer
switch
wait
finish
press
button
say
pause
record
play
dial
hang
Speak
: Talk to the person on the other end of the linePress Buttons
: Presses buttons on phone. Each character is a different button.Wait
: Wait and go silent for an extended period of time (only use if absolutely necessary).Finish
: Say a goodbye message and end the call once completed.input.speech
in the input_schema
.Dynamic Speech Example
https://
and be a valid URL.GET
and POST
.SUPPORTS PROMPT VARIABLES
These are the headers that the tool will send to the external API.The headers must be in JSON format.Since prompt variables are supported, you can use them in the headers to send dynamic information to the external API.Prompt Variables Example (Headers)
SUPPORTS PROMPT VARIABLES
This is the body that the tool will send to the external API.The body must be in JSON format.This is the most common place to use Prompt Variables with AI input.Note: GET
requests do not have a body.Prompt Variables Example (Body)
SUPPORTS PROMPT VARIABLES
Append query parameters to the URL.The query must be in JSON format.This is generally used with GET requests and built-in Prompt Variables like "{{phone_number}}"
or "{{call_id}}"
.Prompt Variables Example (Query)
input_schema.example
can be used to enhance the AI’s understanding of the input structure and helps significantly with structured or nested data.Special Note: input_schema
does not require strict JSON schema structure, and creativity is encouraged.Look here for a general guide on JSON schema structures.Non-traditional JSON schema structures are supported as well, like these examples:Schema Example
{{data}}
Prompt Variable.The path to the data you want must be in JSON Path format. Generally this means using dot notation to traverse the JSON object and is only required if you need to use that information on other tools or the response is too large.Example: