You can define a custom tool either as a transient (inline) configuration or as a permanent stored tool.
Permanent Tool (stored on Sulus servers):
curl -X POST "https://api.sulus.ai/tool" \
-H "Authorization: Bearer $CORE_SYSTEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "function",
"name": "update_crm_contact",
"description": "Update contact information in the CRM system",
"parameters": {
"type": "object",
"properties": {
"contactId": {
"type": "string",
"description": "CRM contact ID"
},
"updates": {
"type": "object",
"description": "Fields to update"
}
},
"required": ["contactId", "updates"]
},
"server": {
"url": "https://api.yourcrm.com/contacts/update",
"secret": "your-webhook-secret"
}
}'
Transient Tool (inline, per-call):
{
"tools": [
{
"type": "function",
"name": "check_inventory",
"description": "Check product inventory for the customer's specific region",
"parameters": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "The product ID to check"
},
"region": {
"type": "string",
"description": "Customer's region code"
}
},
"required": ["productId", "region"]
},
"server": {
"url": "https://api.customer-integration.com/inventory",
"secret": "customer-webhook-secret",
"timeoutSeconds": 30
}
}
]
}