Unispec Docs
ApiAgents

Add a tool

Register an HTTP endpoint the agent may call via function calling.

POST
/v1/agents/{name}/tools

Register an HTTP endpoint the agent may call via function calling.

Authorization

TokenAuth
Authorization<token>

Project API key as Token lb-sk_...

In: header

Path Parameters

name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/agents/string/tools" \  -H "Content-Type: application/json" \  -d '{    "name": "lookup_order",    "description": "Look up an order by id.",    "http": {      "url": "https://api.example.com/orders",      "method": "POST"    },    "parameters": {      "type": "object",      "properties": {        "order_id": {          "type": "string"        }      },      "required": [        "order_id"      ]    }  }'
{  "id": "string",  "name": "string",  "description": "string",  "http_url": "string",  "http_method": "string",  "parameters": {},  "auth_header": "string",  "secret_ref": "string",  "rate_per_min": 0,  "allowed_hosts": [    "string"  ]}