Calling Tools
Learn how to call tools in the Canvas feature through text editors or node configurations.
The Calling Tools feature allows you to execute external APIs or integrations directly from your chatbot flow. Tools can be called through text editors in nodes and edges or by configuring them in the Tools section of the node settings.
What Are Tools?
Tools are external services or APIs that your chatbot can call to perform specific tasks, such as retrieving data, sending notifications, or making calculations.
How to Call Tools
1. Calling Tools Through Text Editors
Tools can be called dynamically within any Text Editor in nodes or edges using the {
shortcut.
Steps:
- Open the Text Editor for the desired node or edge.
- Type
{
to access the tools dropdown. - Select the desired tool from the list.
- The tool call will be inserted into the text.
Example:
2. Calling Tools Through Node Configuration
Tools can also be integrated directly into a node via the Tools section.
Steps:
- Open the node settings and navigate to the Tools tab.
- Click Add Tool to configure a new tool or select an existing one.
- Configure the following:
- Tool Name: Unique identifier for the tool.
- Server URL: The endpoint of the API or webhook.
- Request Method: Choose from
GET
,POST
, etc. - Variables: Define or select variables to pass as parameters.
Example:
- Tool Name:
get_weather
- Server URL:
https://api.weather.com/v3/weather
- Request Method:
GET
- Variables:
city
,date
Visual Placeholder:
Image showing the Tools tab with tool configuration details.
Testing Tool Calls
Before deploying tools, test them to ensure they work correctly.
- Use the Test Tool button in the Tools Tab.
- Provide test inputs for any required variables.
- Observe the tool’s output and verify the response is in valid JSON format.
The response must be in valid JSON format, if not we’ll provide the text response to the AI to decide what to do next but ideally JSON is preferred.
Example Use Cases for Tool Calls
-
Scheduling:
- Call a scheduling API to book an appointment and return the confirmation details.
-
Weather Updates:
- Use a weather API to provide current conditions or forecasts based on user input.
-
E-Commerce:
- Retrieve product availability or pricing from an inventory management system.
Example Flow:
- User asks: “What’s the weather tomorrow?”
- The chatbot calls the
get_weather
tool via a Text Editor or Tools Tab. - The tool retrieves the forecast and displays it to the user.
Best Practices for Calling Tools
- Use Descriptive Names: Clearly label tools for easy identification.
- Test Frequently: Verify tools and their inputs/outputs during development.
- Optimize Tool Usage: Avoid redundant calls to improve performance.
- Combine with Variables: Use dynamic variables to make tool calls context-aware.
Ready to unlock more customization? Learn about Custom Prompts to tailor your chatbot’s behavior!