Skip to main content
POST
/
v1
/
tool-servers
/
{toolServerId}
/
tools
Add a tool to a tool server
curl --request POST \
  --url https://api.devic.ai/v1/tool-servers/{toolServerId}/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tool": {
    "function": {
      "name": "<string>",
      "description": "<string>",
      "strict": true,
      "parameters": {
        "type": "<string>",
        "properties": {},
        "required": [
          "<string>"
        ],
        "additionalProperties": true
      }
    },
    "type": "function",
    "endpoint": "<string>",
    "method": "GET",
    "queryParametersKeys": [
      "<string>"
    ],
    "pathParametersKeys": [
      "<string>"
    ],
    "bodyPropertyKey": "<string>",
    "customHeaders": [
      {
        "headerName": "<string>",
        "value": "<string>"
      }
    ],
    "isFormDataBody": true,
    "bodyMode": "simple",
    "bodyJsonTemplate": "<string>",
    "responsePostProcessingEnabled": true,
    "responsePostProcessingTemplate": "<string>"
  }
}
'
{
  "function": {
    "name": "<string>",
    "description": "<string>",
    "strict": true,
    "parameters": {
      "type": "<string>",
      "properties": {},
      "required": [
        "<string>"
      ],
      "additionalProperties": true
    }
  },
  "type": "function",
  "endpoint": "<string>",
  "method": "GET",
  "queryParametersKeys": [
    "<string>"
  ],
  "pathParametersKeys": [
    "<string>"
  ],
  "bodyPropertyKey": "<string>",
  "customHeaders": [
    {
      "headerName": "<string>",
      "value": "<string>"
    }
  ],
  "isFormDataBody": true,
  "bodyMode": "simple",
  "bodyJsonTemplate": "<string>",
  "responsePostProcessingEnabled": true,
  "responsePostProcessingTemplate": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.devic.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use JWT token for authentication

Path Parameters

toolServerId
string
required

The unique identifier of the tool server

Body

application/json
tool
object
required

Tool definition to add

Response

Tool added successfully

function
object
required
type
enum<string>

Tool type (always 'function')

Available options:
function
endpoint
string

API endpoint for the tool

method
enum<string>

HTTP method

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
queryParametersKeys
string[]

Query parameter keys

pathParametersKeys
string[]

Path parameter keys

bodyPropertyKey
string

Body property key for request body

customHeaders
object[]

Custom headers for the tool

isFormDataBody
boolean

Whether the body is form data

bodyMode
enum<string>

Body mode

Available options:
simple,
advanced
bodyJsonTemplate
string

JSON body template for advanced mode

responsePostProcessingEnabled
boolean

Whether response post-processing is enabled

responsePostProcessingTemplate
string

JS expression template for response post-processing