Skip to main content
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 labeled tool_use in the catalog — for this guide we’ll use Llama-3.3-70B-Instruct-FP8.
Tool-calling reliability scales with model size. The smallest models — for example Meta-Llama-3.1-8B-Instruct-FP8 — handle a single, simple tool call well, but they get less dependable as the schema tightens or the conversation runs over several turns. Two things to watch for: arguments can come back loosely typed (a number as the string "5", or an array collapsed into one comma-separated string), so validate and coerce on your side rather than trusting the raw JSON; and in a multi-step loop the model may keep emitting tool_calls instead of settling on a final answer, so cap the number of tool round trips your code will follow. For multi-step agents, or whenever you depend on exact argument types, prefer a larger tool-capable model such as the Llama-3.3-70B-Instruct-FP8 we use below.

Full round trip

Forcing a specific tool

Set tool_choice to force the model’s hand:
Or "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.