Define tools
tools is an array of Tool objects. Each has type: "function" and a function with:
Send results
results is an optional array (at least one item when present) of { toolCallId, output } objects. output is a string, so serialize structured data as JSON.
Inspect tool calls
Messages returned by List conversation messages can includetool_calls, each with an id, function.name, function.arguments (a string), and a status. Use the call id as toolCallId.
Cancel a tool call
POST …/tool/cancel/{toolCallId} cancels a tool call. It returns 404 if the tool call isn’t found and 409 if it can’t be canceled.
The OpenAPI specification does not describe how a non-streaming chat response signals that a tool call is requested (the response contains
output.reply and finish_reason only), nor the possible finish_reason and status values. This page documents only what the specification and SDKs define.