/v1/chat/completions, so any OpenAI SDK works
unchanged.
Defining tools
A tool is an object withtype: "function" and a function describing its
name, description, and parameters (a JSON Schema for the arguments).
A full round trip
1. The model asks to call a tool
When the model decides to call a tool,finish_reason is tool_calls and the
assistant message carries a tool_calls array. Each call has an id, the
function name, and JSON-encoded arguments:
2. You run the function and send the result back
1
Read the tool call
Parse
message.tool_calls[i].function.name and .arguments (a JSON string).2
Run your function
Execute the function with those arguments in your own code.
3
Send the result back
Append the assistant’s tool-call message, then a
role: "tool" message whose
tool_call_id matches the call’s id and whose content is the result.
Call the model again to get the final answer.tool_choice
Parallel tool calls
Setparallel_tool_calls: true to let the model request several tool calls in a
single turn (the tool_calls array will have multiple entries). Execute each
one, then append a matching role: "tool" message per tool_call_id before
calling the model again.
Observability captures tool names only, never argument values. Omnia’s
telemetry records which tools were called for metrics, but it does not store the
arguments you pass or the results you send back.