Register Custom Edge Function Tool
POST /api/v3/organizations/{organisation}/ai/custom-tools
Registers a custom edge function as a tool that AI models can invoke. This enables customers to create their own tools backed by edge functions.
*
* Edge Function Contract:
* - Edge functions must accept POST requests with JSON payload
* - Expected request format: { 'toolName': '...', 'input': {...}, 'orgId': '...' }
* - Must return JSON response with either result or error field
*
* Async Tools:
* Set isAsync: true for operations >5 seconds. The edge function should return { executionId: '...' } and the AI will poll for completion.
Authorizations
Parameters
Path Parameters
The organisation ID
Request Body required
object
Unique tool name (alphanumeric and underscores only)
check_inventoryHuman-readable description of what the tool does
Check product inventory levels in warehouseHTTPS URL of the edge function
https://inventory-api.my-project.quant.cloudJSON Schema defining the tool’s input parameters
object
Whether this tool runs asynchronously (>5 seconds)
Tool execution timeout
Responses
201
Custom tool registered successfully
object
trueobject
Custom tool registered successfully400
Invalid request parameters
403
Access denied
409
Tool with this name already exists
500
Failed to register custom tool