Local model as a tool-using agent
Use qwen3:8b. On this CPU-only test it called the right tool 10 times out of 10 and the arguments passed JSON Schema on all 9 correct-tool calls. The trade-off is a slower first load: 110 seconds for the 32 tools on this CPU. qwen3:4b is accurate but too slow. llama3.2:3b is fast but unreliable on argument types.
CPU-only. Intel Core i7-12700H, Ollama 0.40.16, 20 Nov 2026, 9:36–10:14 PM America/New_York. The Iris Xe iGPU was not used. GPU numbers were not measured.
What this test was. The models picked tools and filled in arguments. Nothing ran against a live graph. Every speed on this page is CPU-only: Ollama reported 100% CPU and the Intel Iris Xe iGPU was not used as an accelerator. GPU numbers were not measured.
Hardware
| Item | What the run used |
|---|---|
| CPU | 12th Gen Intel Core i7-12700H, 14 cores, 20 logical processors |
| RAM | 39.7 GiB |
| Machine | Dell Inspiron 16 Plus 7620, Windows 11 |
| GPU use | Intel Iris Xe iGPU present, not used. Ollama reported 100% CPU for every loaded model. GPU numbers were not measured. |
| Ollama | 0.40.16 |
| Request | /api/chat, temperature 0, think false, num_ctx 8192. Prompts were about 4,000 tokens and were not truncated. |
| When | 20 Nov 2026, 9:36–10:14 PM America/New_York |
The worked example
StreamGraph is a graph app with an MCP server of 32 tools. It is private and not installable yet. The lesson is general: any MCP server with roughly 30 tools costs about 4,000 tokens of context before the first question.
Ollama does not speak MCP. An MCP client or bridge has to turn the server's tools/list into Ollama's tools format. This recipe has no Ollama MCP flag.
Tool-definition tokens are prompt_eval_count with the 32 tools minus the same user message without them. The compact tool JSON is 18,698 characters. The token costs below are that measured delta, not a character-based guess. llama3.2:3b used 4,028 tokens. qwen3:4b and qwen3:8b each used 3,970.
How the 12 prompts were scored
- 9 prompts asked for a tool that was in the list, 1 prompt asked for no tool ("What is the capital of France?") and 2 prompts named tools that were not in the list.
- Tool accuracy is the correct first tool call, or no call on the no-tool prompt, out of 10. The 2 prompts that name a missing tool are scored separately: did the model invent a tool name?
- Args valid is a JSON Schema check, counted only when the right tool was called. Key args means the obvious arguments matched the prompt (ids, search text, hops, bbox and algorithm).
- Prompt tok/s is the first uncached request with all 32 tool definitions. Later requests are cached and much faster, so they are not used. Gen tok/s is the average of
eval_count/eval_durationover the 12 prompts. Both speeds are CPU-only. thinkwas set to false because Qwen3 defaults to thinking. With thinking on, small Qwen3 models often spend the turn on hidden reasoning and never emit a tool call.
Models
Tags checked on ollama.com on 20 Nov 2026 and confirmed with ollama show. Size is the Ollama tag size.
| Model | Size | Params | Quant | Capabilities |
|---|---|---|---|---|
| llama3.2:3b | 2.0 GB | 3.2B | Q4_K_M | completion+tools |
| qwen3:4b | 2.5 GB | 4.0B | Q4_K_M | tools+thinking (thinking defaults on) |
| qwen3:8b | 5.2 GB | 8.2B | Q4_K_M | tools+thinking (thinking defaults on) |
Measured results CPU-ONLY
Same machine as the hardware table: Intel Core i7-12700H laptop, Ollama 0.40.16 at 100% CPU, 20 Nov 2026, 9:36–10:14 PM America/New_York. The Iris Xe iGPU was not used. GPU numbers were not measured.
| Model | Quant | Tool-def tokens | Tool accuracy (of 10) | Args valid (of correct-tool calls) | Key args ok | Uncached prompt tok/s (CPU-only) | Avg gen tok/s (CPU-only) |
|---|---|---|---|---|---|---|---|
| llama3.2:3b | Q4_K_M | 4,028 | 8/10 | 3/8 | 6/8 | 90.3 | 10.2 |
| qwen3:4b | Q4_K_M | 3,970 | 10/10 | 9/9 | 9/9 | 57.5 | 5.7 |
| qwen3:8b | Q4_K_M | 3,970 | 10/10 | 9/9 | 9/9 | 36.4 | 4.7 |
For qwen3:4b and qwen3:8b, args valid is 9/9. The no-tool prompt counts in the 10 when the model calls nothing. The schema check runs only on a real tool call. There were 9 in-schema tool prompts.
What went wrong
- llama3.2:3b missed 2 of 10. On the neighborhood prompt it wrote a get_node JSON blob in content instead of a structured tool call. On "What is the capital of France?" it called search_nodes. When it did call tools it often passed numbers and booleans as strings ("1", "false") and arrays as the string "[]", so only 3 of 8 correct-tool calls were schema-valid even though the key ids were usually right (key args ok on 6 of 8).
- qwen3:4b got 10/10 with valid arguments, but even with
thinkfalse it wrote long reasoning into content before the tool call (typically 230–1,417 generated tokens, about 1–5 minutes per prompt at about 5.7 tok/s, CPU-only). The thinking field was empty. - qwen3:8b got 10/10 with valid arguments and did not ramble. Most tool calls were 16–48 tokens and finished in about 6–13 seconds once the tools were cached (CPU-only). The first load of the 32 tools took 110 seconds on this CPU.
- Missing tools: no model invented a tool name that was not provided. They used an existing tool or no tool instead.
Which model to use
Use qwen3:8b. It matched qwen3:4b on accuracy and argument checks. It did not write a long reasoning pass before the call. The trade-off is a slower first load: 110 seconds for the 32 tools on this CPU. Once the tools were cached, most calls were 16–48 tokens and finished in about 6–13 seconds. Those times are CPU-only. GPU numbers were not measured.
Coding agents that call tools are compared here: Aider vs Cline.
qwen3:4b is accurate but too slow for this job, because it writes 230–1,417 tokens of reasoning before each call even with think false. llama3.2:3b is fast on this CPU (90.3 uncached prompt tok/s and 10.2 gen tok/s, both CPU-only) but unreliable on argument types.
Commands
Pull the model:
ollama pull qwen3:8b
Then send /api/chat with the tool list, think false and the same options as the run. tools has to be the list an MCP client or bridge built from tools/list. Replace [...] with that list. The message content is the question:
{
"model": "qwen3:8b",
"messages": [{ "role": "user", "content": "..." }],
"tools": [ ... ],
"think": false,
"options": { "temperature": 0, "num_ctx": 8192 }
}
FAQ
Which local model should I use as a tool-using agent?
qwen3:8b. On this CPU-only test it called the right tool 10 times out of 10 and the arguments passed JSON Schema on all 9 correct-tool calls. The first load of the 32 tools took 110 seconds on this CPU. GPU numbers were not measured.
Did the tools actually run?
No. This was a tool-selection test. The models picked tools and filled in arguments. Nothing ran against a live graph.
Were these speeds measured on a GPU?
No. Every speed is CPU-only. Ollama reported 100% CPU on an Intel Core i7-12700H. The Intel Iris Xe iGPU was present and was not used. GPU numbers were not measured.
Does Ollama speak MCP?
No. An MCP client or bridge has to turn the server's tools/list into Ollama's tools format. This recipe does not use an Ollama MCP flag.
How much context do about 30 tools cost?
About 4,000 tokens before the first question. On this 32-tool server the measured tool-definition cost was 4,028 tokens for llama3.2:3b and 3,970 tokens for qwen3:4b and qwen3:8b.