HTTP tools
See the HTTP tools guide for how a tool’s request is built.
Paths are relative to /api/workspaces/{workspaceId}.
| Method | Path | Does |
|---|---|---|
GET |
/tools/ |
List tools |
POST |
/tools/ |
Create a tool |
PATCH |
/tools/{toolId} |
Update |
DELETE |
/tools/{toolId} |
Delete |
GET |
/agents/{agentId}/tools/ |
Tools this bot has |
POST |
/agents/{agentId}/tools/ |
Attach: { "toolId": "…" } |
DELETE |
/agents/{agentId}/tools/{toolId} |
Detach |
Create a tool
Section titled “Create a tool”curl -X POST https://<host>/api/workspaces/{workspaceId}/tools/ \ -H "Authorization: Bearer $KATA_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "get_order", "description": "Look up an order by its id.", "method": "GET", "url": "https://api.example.com/orders/{orderId}", "parameters": [ { "name": "orderId", "type": "string", "description": "The order id", "required": true } ] }'| Field | Required | Notes |
|---|---|---|
name |
yes | |
url |
yes | May contain {placeholders} |
method |
no | GET (default), POST, PUT, PATCH, DELETE |
description |
no | Tells the bot when to use it |
parameters |
no | name, type (string / number / boolean), description, required |