Tools Service API
API reference for managing AI agent tools and tool categories
The Tools Service provides endpoints for managing and interacting with tools that can be used by AI agents. It includes functionality for creating, listing, updating, and testing tools, as well as managing tool categories.
Authentication
All endpoints require a valid Bearer token in the Authorization header.
Base URL
Tool Categories Endpoints
List Tool Categories
Retrieve all tool categories.
Endpoint: GET /api/tools/list_categories
Create Tool Category
Create a new tool category.
Endpoint: POST /api/tools/create_category
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Category name |
description | string | Yes | Category description |
Response:
Field | Type | Description |
---|---|---|
id | string (UUID) | Category ID |
name | string | Category name |
description | string | Category description |
created_at | string (datetime) | Creation timestamp |
updated_at | string (datetime) | Last update timestamp |
Update Tool Category
Update an existing tool category.
Endpoint: PUT /api/tools/update_category
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
category_id | Yes | Category ID to update |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
name | string | No | New category name |
description | string | No | New category description |
Delete Tool Category
Delete a tool category.
Endpoint: DELETE /api/tools/delete_category
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
category_id | Yes | Category ID to delete |
Tools Endpoints
Create Tool
Create a new tool.
Endpoint: POST /api/tools
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Tool name |
description | string | Yes | Tool description |
category_id | string (UUID) | Yes | Category ID |
is_active | boolean | No | Whether the tool is active (default: true) |
version | string | Yes | Tool version |
logo_url | string | No | URL to the tool’s logo |
is_public | boolean | No | Whether the tool is publicly available (default: false) |
configuration | array | Yes | Configuration parameters for the tool |
inputs | array | Yes | Input parameters for the tool |
outputs | object | Yes | Output specification |
settings | object | Yes | Tool implementation settings |
List All Tools
Retrieve all available tools.
Endpoint: GET /api/tools/list_all
Update Tool
Update an existing tool.
Endpoint: PUT /api/tools
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
tool_id | Yes | Tool ID to update |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
name | string | No | New tool name |
description | string | No | New tool description |
is_active | boolean | No | Whether the tool is active |
… | … | No | Any other fields to update |
Test Tool
Test a tool with specified inputs and configurations.
Endpoint: POST /api/tools/test_tool
Query Parameters:
Parameter | Required | Description |
---|---|---|
tool_id | Yes | Tool ID to test |
Request Body:
Field | Type | Required | Description |
---|---|---|---|
input_prompt | string | Yes | Prompt to send to the tool |
config_items | array | Yes | Configuration parameters |
provider | string | Yes | LLM provider to use |
model_name | string | Yes | Model name to use |
api_key | string | Yes | API key for the LLM provider |
instructions | string | No | System instructions for the LLM |
Response:
Field | Type | Description |
---|---|---|
result | string | Result from the tool execution |
execution_time | number | Time taken to execute the tool (in seconds) |
token_usage | object | Token usage information |
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid input or validation error |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error - Server-side error |
Implementation Notes
- Tools are designed to be integrated with AI agents
- Tools can be organized into categories for better management
- Each tool requires specific configuration parameters and input/output specifications
- The testing functionality allows users to verify tool functionality with different inputs
- Tools can be public (available to all organizations) or private (only available to the creating organization)
Was this page helpful?