Custom Tools Overview
What is a Custom Tool?
Custom tools are powerful extensions that enable voice and chat AI to perform tasks across the internet. They open opportunities for custom functionality, data retrieval, data extraction, and workflow automation while understanding and responding contextually to the task at hand.
How Does a Custom Tool Work?
A custom tool operates as an LLM function call wrapped in an API call. It specifies AI functionality through a description and parameters, while the endpoint URL facilitates a POST call with contextual awareness of the endpoint's return data. This functionality is ideal for integrations like MLS systems, solar quoting, data fetching, and more.
Use Cases for Custom Tools
The potential applications of custom tools are as broad as your creativity or needs. Examples include:
- Updating contact information: AI collects details and sends them to a webhook to update CRM records.
- Advanced workflows: Multi-stage tool calls can generate Stripe customer IDs and unique checkout links to send via SMS.
Understanding Inputs
Name [raw JSON format]:
This specifies the unique name of the tool call, triggered when the AI determines a condition matches. The name should reflect the tool's function in plain raw text. For instance:
- Updating contact information:
update_contact
- Retrieving a delivery date for an order:
get_delivery_date
Description [conversational text]:
The description is crucial as it guides the AI on the tool's purpose, how to use it, and when to trigger it. For example, a description for get_delivery_date
could be:
"Retrieve the delivery date for a customer's order. Use this tool when a customer asks, 'Where is my package?'"
Endpoint URL [URL Format]
The Endpoint URL is where the AI sends a POST request, delivering data and expecting a response. For example, to retrieve real estate listings from an MLS, the URL might look like this:https://api.bridgedataoutput.com/api/v2/OData/dataset_id/Property?access_token=access_token&$expand=ListOffice.
This URL represents the specific API or webhook endpoint to which parameters are sent.
Authorization & Key [Toggle and Bearer Token]
Authorization is integrated into the API wrapper, enabling you to call API endpoints that require authentication or API keys. Use the Bearer Token format for this field. For example, if API documentation specifies an authorization header, input your account's API key here to authenticate the call.
Parameters [Key/Value Pairs with Descriptions]
Parameters define the data being requested, including a detailed description of what information is needed and its expected format. The key should follow JSON naming conventions (lowercase, no spaces—use underscores instead—and avoid special characters). The value is a description that specifies the data and format required.
For example:
-
Key/Value Pair
name: Johnny
Output:{"name":"johnny"}
-
Parameters Example
Key:revenue
Value: The annualized revenue of the user in raw number format.
Output:{"revenue":123456}
AI automates the generation of the "value" field based on the input description, simplifying complex data handling. For instance:
- Key:
name
- Value: The first name of the user.
Output:{"name":"johnny"}