Tool use (a.k.a. “function calling”) lets the model decide when to call a function you’ve defined, returns the arguments it wants to pass, and lets you feed the result back in for a final answer. Models that support tool use are labeledDocumentation Index
Fetch the complete documentation index at: https://docs.flex.ai/llms.txt
Use this file to discover all available pages before exploring further.
tool_use in the catalog — for this guide we’ll use Qwen/Qwen2.5-32B-Instruct.
Full round trip
Forcing a specific tool
Settool_choice to force the model’s hand:
"tool_choice": "required" to force it to call some tool, or "none" to forbid tool calls entirely.
Parallel tool calls
Most tool-capable models we host can emit multiple tool calls per turn (message.tool_calls will have length > 1). Handle each one, then add one role: "tool" message per call — each with the matching tool_call_id — before the next completion call.