Skip to main content
POST
/
tools
Create Tool
curl --request POST \
  --url https://api.truedy.ai/api/public/v1/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Weather API",
  "definition": {
    "type": "http",
    "method": "GET",
    "base_url": "https://api.weather.com/forecast",
    "parameters": [
      {
        "name": "location",
        "type": "string",
        "required": true,
        "description": "City name"
      },
      {
        "name": "units",
        "type": "string",
        "required": false,
        "default": "metric",
        "enum": [
          "metric",
          "imperial"
        ]
      }
    ]
  }
}
'
{
  "data": {
    "id": "tool_p1q2r3s4",
    "name": "Book Appointment",
    "type": "http",
    "description": "Books an appointment in the CRM calendar",
    "url": "https://api.example.com/appointments",
    "method": "POST",
    "headers": {
      "Content-Type": "application/json",
      "X-API-Key": "{{api_key}}"
    },
    "body_template": "{\"name\": \"{{contact_name}}\", \"time\": \"{{appointment_time}}\"}",
    "timeout_seconds": 10,
    "created_at": "2026-03-10T08:00:00Z",
    "updated_at": "2026-04-01T12:00:00Z"
  },
  "meta": {
    "request_id": "req_32e7531c",
    "ts": "2026-04-05T10:22:00Z"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header: Bearer <your_api_key>

Body

application/json
name
string
required

Display name for the tool

Required string length: 1 - 255
Example:

"Weather API Tool"

definition
object
required

Tool definition (HTTP config, parameters, authentication)

Example:
{
"type": "http",
"method": "GET",
"base_url": "https://api.weather.com/forecast",
"parameters": [
{
"name": "location",
"type": "string",
"required": true,
"description": "City name"
}
]
}

Response

Tool created successfully

data
object
required
meta
object
required