Features
Tool calling
Let models propose actions; keep execution in your product
Eligible routes can receive OpenAI-compatible tool definitions. The application remains responsible for validating arguments, authorising the action and returning the tool result.
Define tools with JSON Schema
Describe the function and its input contract in the request. Only use a route confirmed to support tool calling.
tools = [{
"type": "function",
"function": {
"name": "lookup_order",
"description": "Look up an order visible to the current user",
"parameters": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"]
}
}
}]Validate before execution
Treat model-generated arguments as untrusted input. Validate the schema again, apply user and workspace authorization, and reject actions outside the product boundary.
- Never let the model choose credentials
- Check resource ownership and permissions
- Apply timeouts and idempotency to side effects
- Log the decision without sensitive payloads
Return the tool result
Append a tool message associated with the tool call, then send the updated conversation back through the same governed route.
Preserve capability during fallback
When tools are required, the policy route and any fallback must remain eligible for tool calling. Do not silently downgrade to a route that cannot satisfy the contract.
