An agent that needs three files does not have to ask for them one round trip at a time. With parallel tool calls the model asks for all three at once.
How it works
In a tool calling response, message.tool_calls is a list. With parallel calls it has more than one entry, each with its own id, function name and JSON arguments.
"tool_calls": [
{"id": "call_1", "type": "function", "function": {"name": "read_file", "arguments": "{\"path\": \"a.py\"}"}},
{"id": "call_2", "type": "function", "function": {"name": "read_file", "arguments": "{\"path\": \"b.py\"}"}}
]
Your code runs the calls and appends one tool message per call, each with the matching tool_call_id, then calls the model again.
- OpenAI:
parallel_tool_callsdefaults totrue. Setting it tofalse“ensures exactly zero or one tool is called.” The guide warns that one model snapshot sometimes repeated calls to the same tool and recommends turning the feature off there. - Anthropic: parallel use is on by default. Turn it off with
disable_parallel_tool_use: trueinside the tool_choice object. Anthropic says the API “doesn’t prescribe an execution order”, and that all tool results should come back in a single user message to keep parallelism working.
Why it matters
- Latency. Fewer model round trips. Independent, read-only tools can run at the same time on your side.
- Ordering. Calls with side effects, such as write then read, may depend on each other. Anthropic suggests running those sequentially. Or turn the feature off.
- Bookkeeping. Every call needs a result with the right ID. A missing result is a common cause of the next request failing.
On BroadNet Inference
BroadNet’s API reference documents tool calling for GLM 5.3 and Qwen3.8 27B and does not document parallel_tool_calls. Test whether your prompt gets several calls back and whether false is honoured. Parallel calls arrive in one response, so they do not add to your request count. Running the tools is on your side. Note that a BroadNet unlimited plan session allows one request at a time, and is for DeepSeek V4.1 Flash only; on pay-as-you-go keys the concurrency limit is 4 requests in flight. The open-model tool calling post has a working loop.
Common mistakes
- Returning results in a different message format for each call, or dropping one.
- Running dependent tools concurrently because the model listed them together.