Skip to main content
POST
/
admin
/
tool
/
custom
Create Custom Tool
curl --request POST \
  --url https://cloud.onyx.app/api/admin/tool/custom \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "definition": {},
  "passthrough_auth": true,
  "description": "<string>",
  "custom_headers": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "oauth_config_id": 123
}
'
{
  "id": 123,
  "name": "<string>",
  "description": "<string>",
  "definition": {},
  "display_name": "<string>",
  "in_code_tool_id": "<string>",
  "custom_headers": [
    "<unknown>"
  ],
  "passthrough_auth": true,
  "mcp_server_id": 123,
  "user_id": "<string>",
  "oauth_config_id": 123,
  "oauth_config_name": "<string>",
  "enabled": true,
  "chat_selectable": true,
  "agent_creation_selectable": true,
  "default_enabled": false
}

Authorizations

Authorization
string
header
required

Authorization header with Bearer token

Body

application/json
name
string
required
definition
Definition · object
required
passthrough_auth
boolean
required
description
string | null
custom_headers
Header · object[] | null
oauth_config_id
integer | null

Response

Successful Response

id
integer
required
name
string
required
description
string
required
definition
Definition · object
required
display_name
string
required
in_code_tool_id
string | null
required
custom_headers
any[] | null
required
passthrough_auth
boolean
required
mcp_server_id
integer | null
user_id
string | null
oauth_config_id
integer | null
oauth_config_name
string | null
enabled
boolean
default:true
chat_selectable
boolean
default:true
agent_creation_selectable
boolean
default:true
default_enabled
boolean
default:false