Overview
Build custom tools (formerly "plugins") that extend your agents' capabilities by connecting to external APIs and services. This tutorial walks through creating a tool from scratch, configuring API endpoints, defining variables, and testing functionality using a real-world math calculation example.
Important Note: Tools have replaced plugins in the TeamAI interface. All functionality previously available through plugins is now accessed through the tools system with enhanced configuration options and testing capabilities.
Learning Objectives:
Access the tool creation interface from the left panel
Understand the four tool type options and when to use each
Configure API endpoints with dynamic variables
Define and map variables for user input extraction
Handle special character encoding in URL parameters
Test tools before launching to verify functionality
Prerequisites
You'll Need:
Access to a workspace with tool creation privileges (Professional or Enterprise plan)
Understanding of REST APIs, endpoints, and HTTP methods (GET/POST)
A target API to connect to (we'll use math.js as an open-source example)
Basic knowledge of URL encoding for special characters
At least one folder created if you want to organize your tool
Important: Tool creation requires API configuration skills. If you're not comfortable with endpoints and variables, consider using pre-built tools or consulting with a developer.
Creating a New Tool
Access the Tool Creation Interface
Navigate to the left panel to view your workspace navigation menu
Click the "Tools" icon (represented by a π§ wrench) in the left panel navigation
Click the "+ Create a Tool" button at the top-right of the tools list
βEnter a Tool Name in the "Name" field (e.g., "Math Calculator")
βSelect Tool Type - Click the dropdown and choose from these options:
β
Tool Type | When to Use | Best For |
API Tool | Connecting to any REST API endpoint | External services, data lookup, calculations |
MCP Server | Connecting to Model Context Protocol servers | Advanced AI model integrations |
Form Collection | Gathering structured user input | Surveys, data collection, user forms |
MCP Studio | Building complex multi-step tool workflows | Advanced automation sequences |
βResult: The "New Tool" creation modal appears with configuration options.
Configure Tool Type and Visibility
Write a description explaining what the tool does (e.g., "Performs mathematical calculations using math.js API")
βSelect an avatar for your tool. You can upload a custom image or click "Generate with AI" to create one automatically
β
Note: You can change the tool's group assignment later, but the tool type cannot be changed once you advance to the main wizard interface
β
Navigate to API Setup
Click the "API Setup" tab in the left panel (below Details)
βObserve the completion tracker showing "0% complete" with sections for:
Configure Endpoint and Method
Enter the API Endpoint URL in the "API Connection" field
For our math.js example: https://api.mathjs.org/v4/?expr={{a}}{{operation}}{{b}}.
To determine your API's endpoint URL:
1) Visit the API provider's documentation, in our example is https://api.mathjs.org/
2) Find the GET request examples,
3) Identify the base URL and parameter structure,
βWhere base URL is
http://api.mathjs.org/v4/?expr=
and the parameters are2%2B8a=2 %2b is the "+" sign for operation and b=8
βReplace with your target API URL
βhttps://api.mathjs.org/v4/?expr={{a}}{{operation}}{{b}}
Select the Request Method:
GET: For retrieving data (most common for queries and calculations)
POST: For sending data to create or update resources
Example for math.js: Select "GET" since we're requesting a calculation result
Result: The request preview at the bottom updates to show your configured endpoint.
Add Variables
Click "Add Variable" in the "Variables" section
Configure each variable by completing these fields:
For our math example, add these three variables:
Variable 1: a
Variable Name:
aDescription: First Number to be used in the operation
Type: Number
Required: Yes (toggle on)
Description: "First number (higher number for division)"
Variable 2: b
Name:
bDescription: Second Number to be used in the operation
Type: Number
Required: Yes (toggle on)
Description: "Second number (lower number for division)"
Variable 3: operation
Name:
operationType: String
Required: Yes (toggle on)
Description: "Math operator (%2B for add, %2F for divide, %2D for subtract, %2A for multiply)"
Result: The variables appear in your list and the request preview updates to show {{a}} {{operation}} {{b}} placeholders.
Tip: Variable names in double curly braces {{variableName}} must match exactly what you used in the endpoint URL.
Variable Type Reference
Type | Use For | Example | UI Prompt |
Text Input | Strings, names, messages | city, name, query | Text field |
Number Value | Numeric data | limit, count, id | Number input |
Boolean Flag | True/false toggles | enabled, verbose | Checkbox |
List of Strings | Multiple text values | tags, categories | Multi-select text |
List of Numbers | Multiple numeric values | ratings, scores | Multi-select numbers |
Configuring Headers and Parameters
Add Authentication Headers (If Required)
Click "Add Header" in the "Headers" section
Configure common headers or add custom ones:
Common headers you may need:
Authorization:
Bearer YOUR_API_TOKENContent-Type:
application/jsonAccept:
application/jsonUser-Agent:
TeamAI-Tool/1.0
For math.js (public API): No headers required
Result: Headers are added to your API request configuration.
Note: Never commit API keys or tokens directly in tool configurations for shared tools. Use workspace secrets management if available.
Configure Query Parameters
Click "Add Parameter" in the "Query Parameters" section
Add URL parameters (these append to your endpoint as
?key=value&key=value)
For math.js: The expression parameter is already included in the main URL (?expr=...), so no additional parameters needed.
Result: The "Request Preview" section at the bottom shows your complete API call structure.
Testing Your Tool
Navigate to Test & Launch
Click the "Test & Launch" tab in the left panel
Fill in test values in the test fields that appear:
Click "Run Test" to execute the API call
Result: The test executes and shows a loading indicator while contacting the API.
Review Response Data
Check the "Response Data" section that appears below the test button
Verify you receive the expected result: For
10%2B5, you should see15
Successful Response Example:
{ "status": 200, "data": "15", "responseTime": "124ms" }Result: Your tool is working correctly and ready to launch.
Troubleshooting: If you get an error:
Check URL encoding: Verify operators use
%2B,%2F, etc., not raw symbolsValidate variable values: Ensure numbers don't contain letters or spaces
Review API limits: Some public APIs have rate limits; wait and retry
Check endpoint: Confirm the URL is accessible in your browser
Launching and Using Your Tool
Finalize and Enable
Click "Save Changes" at the top-right of the screen
Click the "Tools" button and check if your tool exists
Result: Your tool is now active and ready for use.
Common Questions
Q: Can I edit a tool after launching it?
A: Yes. Return to the Tools section, click your tool name, and edit any configuration. Changes take effect immediately without requiring reactivation.
Q: Why do I need to URL encode special characters?
A: URLs interpret special characters as control syntax. Encoding (e.g., %2B for +) ensures the character is treated as literal data, not URL structure.
Q: What variable types should I use?
A: Use "Text Input" for strings, "Number Value" for numeric data, "Boolean Flag" for true/false, and "List" options for multiple values. Required variables must be provided for the tool to execute.
Q: Can I see the tool's API calls in the chat?
A: No. The API calls happen in the background. Only the final result appears in the chat. Use the Test & Launch tab to debug API behavior.
Q: How do I handle APIs that require POST instead of GET?
A: Select "POST" as the request method, then configure the request body payload using the "Request Configuration" section that appears. Define JSON structure with your variables.
Best Practices
Test with multiple scenarios: Run tests with different variable values (positive numbers, negative numbers, zero) to ensure your tool handles edge cases gracefully.
Document your variables: Write clear descriptions for each variable explaining expected format and any special requirements (like URL encoding for operators).
Use public APIs for testing: Practice with open APIs like math.js, JSONPlaceholder, or public weather APIs before configuring production or paid services.
β
β




















