Ollama Function Calling (Tools) Not Working? Model Capability, Endpoint & Thinking Mode Diagnosis Guide

2026-11-24 | GPU Repair | 33 minutes | HK GPU Fix Editorial Team

Ollama Function Calling (Tools) Not Working? Model Capability, Endpoint & Thinking Mode Diagnosis Guide

Key takeaway

When Ollama answers in plain text instead of calling a tool, the cause is one of three variables: whether the model supports tools, which endpoint received the request, or whether thinking mode is on. Three comparisons — a model comparison, an endpoint comparison, and a thinking-mode comparison — separate them, and the thinking-mode result must be measured, never assumed.

Introduction

The request is sent with a `tools` array, the model is supposed to reply with a `tool_calls` entry naming a function and its arguments, and instead the reply comes back as plain text. No function is named, no arguments are given, and the program that was waiting for a tool call has nothing to execute. Or the reply does not come back at all: the server answers HTTP 400 with `{"error":"registry.ollama.ai/library/gemma3:270m does not support tools"}` two milliseconds after the request was sent.

That combination — a request that looks correct, a model that answers ordinary questions normally, and a tool call that never happens — has a specific shape, and it points in a specific direction. The server is probably not down, and the model is probably not failing to load. What failed is narrower: somewhere between the request and the reply, one of three variables went wrong — the model does not support tools, the request went to an endpoint that does not accept a `tools` field, or the thinking-mode setting changed whether the model calls the tool at all.

Tool calling is not the model doing work for you. It is a four-step exchange: you send a `tools` array describing functions by name, description, and parameter schema; the model replies with `tool_calls` naming a function and its arguments, and nothing else is executed; your program reads that reply, runs the function, and sends the result back with the `tool` role; and the model then answers using that result. The model only writes down which function it wants called. Ollama and the model execute nothing, and the responsibility for running anything — including anything with side effects — stays entirely with your program.

This guide explains how those three variables work, how to prove which one is responsible, and how to avoid the mistakes that make the diagnosis look confusing. It is a diagnostic guide for one narrow shape: a `tools` array is sent, plain-text questions to the same model work normally, and the tool call either comes back as a hard HTTP 400 refusal or never comes back at all. If the server cannot be reached, if the model cannot load, if the answer stops halfway, or if a vision model cannot read an image, different articles apply, and the boundary section near the end says which ones.

Symptom definition: what counts as this problem

This article covers one narrow shape. All three of the following must be true; if any one is missing, the problem belongs somewhere else.

First, a `tools` array is sent to `/api/chat`, and the model does not reply with `tool_calls`. There are two shapes, and they must be kept apart. The first is a hard refusal: HTTP 400 with an explicit error message, `{"error":"registry.ollama.ai/library/<model> does not support tools"}`, returned within 2 milliseconds, with nothing generated at all (measured by localaiscope on Ollama 0.40.16 with gemma3:270m). The second is silent ignoring: HTTP 200 with a plain-text answer, no `tool_calls` field at all, and no error message. The hard refusal carries its own evidence in the error message; the silent case carries none, and only comparison tests can separate it.

Second, plain-text questions work normally. Without a `tools` array, the same model answers well — which proves the server is running and the model is loaded, so the problem is not in the connection layer (article #565) or the loading layer (articles #552 and #556).

Third, the two failure shapes are diagnosed differently. A hard refusal is tested with T1, the model-capability comparison. A silent ignore is tested with T2, the endpoint comparison, or T3, the thinking-mode comparison — because a silent ignore can mean either that an old server silently dropped the `tools` field, or that a small model simply skipped the call. The two shapes must never be mixed into one test.

These three shapes need to be kept apart because each one is measured differently. Not being able to reach the server at all is the #565 route (bind address, listening, firewall). A model that loads but runs on the CPU is the #556 route (`num_gpu`). An answer that stops halfway is the #566 route (`num_predict`, stop sequences). A vision model that fails to read an image is the #569 route in the same batch — the `images` field, not the `tools` field; the same tool family, a different API field. This article is about the remaining shape: the `tools` field itself — whether the model supports it, whether the endpoint accepts it, and whether thinking mode changes the outcome.

Five layers of mechanism

Tool calling has three variables that can each break it on their own: the model's capability, the endpoint, and the thinking-mode setting. Two further layers — model behaviour and client parsing — produce failures that look similar but are not the same fault, and they are kept separate below. The details come from the sources listed at the end of this article, all re-checked by search on 2026-11-24.

Layer one: the model-capability layer — the model simply does not support tools. This is a main subject of this article. If the model has no `tools` capability, the server refuses the request before generating anything: HTTP 400, `{"error":"registry.ollama.ai/library/gemma3:270m does not support tools"}`, within 2 milliseconds, with nothing generated (localaiscope measurement, Ollama 0.40.16). The evidence is test T1. On 2026-11-20, the models carrying a `tools` label were qwen3, qwen2.5, llama3.2, granite4, and smollm2; gemma3 had none (localaiscope) — but the label changes with version and model size, so the reader must check their own version with `ollama show` rather than copying a list. Across the whole article library, "tool_calls", "does not support tools", "function calling", and the Chinese "工具呼叫" all appear zero times in both languages (re-counted from the repository data for this article).

Layer two: the endpoint layer — the wrong endpoint. This is a main subject of this article. Only `/api/chat` accepts `tools`; `/api/generate` has no such parameter. An old server (v0.2.0 and earlier) silently drops the `tools` field — HTTP 200 with a text answer, no `tool_calls`, and the client concludes that "the model ignores the schema" (baeseokjae measurement). The evidence is test T2. There is a second endpoint trap: on `/v1/chat/completions`, `arguments` is a JSON string, while on the native `/api/chat` it is a JSON object — switching endpoints without switching the parsing code makes the program raise a `TypeError` (hvr.biz measurement). Across the whole article library, "/api/generate" appears only in articles #555 and #566, in a lifecycle context and a generation-parameter context respectively, and never in a comparison of the two endpoints' `tools` support.

Layer three: the thinking-mode layer — the thinking switch changes the call rate. This is a main subject of this article. With the same model (for example qwen3), the same questions, and the same tools, the number of calls differs between thinking on and thinking off. The evidence is test T3. The direction cannot be written down as a fixed rule: three sources point three ways, and the section on T3 gives the numbers. Across the whole article library, the Chinese "thinking 模式" appears zero times; the English word "thinking" appears in 23 articles, all in ordinary senses such as "thinking of upgrading", and none of them about a model's thinking mode or about tool calling.

Layer four: the model-behaviour layer — a small model skips the call or gets the parameters wrong. This is an auxiliary observation, not a main subject. A model can have `tools` capability and still sometimes skip the call, pick the wrong tool, or return malformed arguments (jacar.es). A schema is not a contract — hvr.biz states it directly: "A JSON schema in the request is a hint to the model. It is not a contract." In their measurement, a small model violated `enum` and `maximum` limits and still returned HTTP 200 with a formally valid `tool_calls`. This layer is not "not working", it is "working badly" — and this article keeps the two apart rather than writing a behaviour problem as a capability problem.

Layer five: the client layer — the program parses the wrong `arguments` shape or assumes the wrong streaming behaviour. This is an auxiliary observation, not a main subject. A program that reads a `/v1` response with native-API parsing will fail because `arguments` there is a string, not an object; and a program that assumes streaming delivers `tool_calls` piece by piece will wait for pieces that never come — the whole `tool_calls` array arrives in the first chunk, and the second chunk is `done` (hvr.biz measurement). These are client-program problems, not Ollama problems.

The mechanism leads to one key distinction: "tool calling does not work" is not one cause, it is one of three variables failing — whether the model supports tools, which endpoint the request used, and whether thinking mode is on. Each variable has its own test, and each test's variable and outcome are different.

Where the capability comes from

Tool calling support arrived on 2024-07-25, with the first supported models being Llama 3.1, Mistral Nemo, Firefunction v2, and Command-R+ (Ollama official blog, via jacar.es). In 2026, the most reliable local tool models are qwen3, llama3.3, mistral-small3.2, gemma3, and granite4 (jacar.es, re-checked 2026-11-24). The capability itself comes from one of two places (baeseokjae, measured on Ollama 0.20.3): a `.Tools` block inside the chat template, or a built-in parser in the model itself (cogito, gemma4, deepseek3, lfm2, ministral). The `Capabilities` column printed by `ollama show` is the server's own inferred list — a model only accepts a `tools` field if `tools` appears there. That is why a model with a built-in parser can support tools even when its template has no `.Tools` block, and why reading the template alone is not enough.

Two shapes, two kinds of evidence

A hard refusal and a silent ignore are not two severities of the same fault; they are two different kinds of evidence. A hard refusal is the server telling you, in the error message, that the model does not support tools — it arrives in 2 milliseconds, before any generation, and the fix is to change the model, not to reinstall anything. A silent ignore tells you nothing on its own: it can mean an old server dropped the field, or a small model decided not to call, or the request went to an endpoint that has no `tools` parameter. That is why the silent shape needs T2 and T3, while the hard shape is settled by T1. Knowing the server version first (`ollama --version`) decides which shape is even possible: a new server refuses loudly, a server at v0.2.0 or earlier drops the field silently.

Seven-step diagnosis

  1. Characterise the shape. Which kind of not-working is it: an HTTP 400 refusal (go to step 2 and read the Capabilities column) or an HTTP 200 text answer (go to step 4 and check the endpoint and thinking mode)? If plain-text questions fail too, this is not this article — go to #565, #556, or #552.
  2. Read the Capabilities column. Run `ollama show <model>` and look for `tools` in the Capabilities column (T1). No `tools` there means changing to a model that carries the label (for example qwen3 or llama3.2). `tools` present means continuing to the next step.
  3. Compare models. Send the same `tools` request to a supporting model and to a non-supporting model (T1): the supporting model returns `tool_calls` and the non-supporting model returns HTTP 400, which confirms the model-capability layer as the cause.
  4. Compare endpoints. Send the same request to `/api/chat`, `/api/generate`, and `/v1/chat/completions` (T2): `/api/chat` returns `tool_calls`, `/api/generate` silently ignores the field, and `/v1` returns `arguments` as a JSON string — which confirms the endpoint layer, and means checking which endpoint the program actually uses and whether its parsing matches.
  5. Compare thinking mode. With the same model, the same five questions, and the same tools, run thinking off five times and thinking on five times (T3): if the call counts differ widely, the thinking-mode layer is the cause, and the setting with the higher call count is used; if the counts are close, thinking mode is not the cause.
  6. Check behaviour (auxiliary). If the model does call, but picks the wrong tool or returns wrongly formatted parameters, that is the behaviour layer: validate the returned values in the program, reduce the number of tools, and write clearer descriptions — do not blame the capability layer.
  7. Stop. If all three tests still do not separate the cause, record six things — the model name, the `ollama show` Capabilities output, the server version (`ollama --version`), which endpoint is used, whether thinking is on or off, and the full error message — and bring those notes to a check. Do not reinstall Ollama or the model one after another: reinstalling cannot change whether a model supports tools.

Three decisive tests

Each test changes exactly one variable and records the same outcome: whether the reply contains `tool_calls`. Keep the model, the questions, and the tools fixed unless the test itself says to change one of them. Use five questions that each clearly need a tool — for example "check today's weather" with a weather tool — and run each setting five times, because a small model may skip a call on one run and make it on the next.

T1: Model-capability comparison — `ollama show` Capabilities has `tools` against not; the same request, a supporting model against a non-supporting model

First, run `ollama show <model>` in a terminal and look at the Capabilities column for `tools`; or run `ollama show --modelfile <model>` and check whether the template has a `.Tools` block (`grep -c '\.Tools'` — the check baeseokjae documents). Second, send the same `tools` request to two models, for example `qwen3:0.6b` against `gemma3:270m`.

Why this test is new: "tool_calls", "does not support tools", "function calling", and "工具呼叫" all appear zero times in Chinese and English across the whole article library (re-counted from the repository data for this article). Article #566 covers `/api/chat` parameters (`num_predict`, `stop`, `stream`) and never mentions the `tools` field. Article #556 covers Modelfile settings (`PARAMETER num_gpu`, API `options.num_gpu`) and never mentions the Capabilities column. Article #555 covers `ollama ps` columns (PROCESSOR, UNTIL) and never mentions `ollama show` Capabilities. T1's variable is "which model is used" and its outcome is "whether the reply contains `tool_calls` or returns HTTP 400 'does not support tools'" — no neighbouring article has that variable combination.

T2: Endpoint comparison — the same `tools` request to `/api/chat` against `/api/generate` against `/v1/chat/completions`

Send the same `tools` request to three endpoints, one at a time: (a) `/api/chat`; (b) `/api/generate`; (c) `/v1/chat/completions`.

Why this test is new: "function calling" appears zero times in Chinese and English across the whole article library (re-counted from the repository data for this article). "/api/generate" appears only in articles #555 and #566 — #555 in a lifecycle context, #566 in a generation-parameter context — and neither compares the two endpoints' `tools` support. hvr.biz states directly that switching endpoints without switching the parsing raises a `TypeError`, because native `arguments` is an object and `/v1` `arguments` is a string. T2's variable is "which endpoint is used" and its outcome is "whether the reply contains `tool_calls`, and whether `arguments` is an object or a string" — no neighbouring article has that variable combination.

T3: Thinking-mode comparison — the same model, the same five questions, the same tools, thinking off five times against thinking on five times, counting the calls

Lock one model (for example qwen3), the same five questions that each clearly need a tool, and the same `tools` array. Run thinking off five times, then thinking on five times. Each time, record whether the reply contains `tool_calls`, whether the right tool was picked, and whether the parameters were correctly formatted.

SourceModel and setupThinking offThinking on
localaiscope (Ollama 0.40.16)qwen3:0.6b, small modelnot reported — the source ran 5 attempts with thinking on only (1 of 5 calls)1 of 5 calls — thinking on was worse
bigiron.cc (Ollama gateway)Qwen3-4B Q420 of 2019 of 20, 5 times slower, one request taking 11 minutes — thinking bought nothing and cost a lot
hackbig (MLX)Qwen3.6-35B-A3B, 96 tool-call tasks73.96% accuracy95.83% accuracy, 3.57 times slower — thinking on was much better

The three sources are not contradicting each other; they differ in model size (0.6B against 4B against 35B), version, and runtime stack (Ollama against MLX). None of the three directions may be copied as the answer. The reader must run five runs on each side on their own model, version, and runtime stack, and read their own numbers.

Why this test is new: the Chinese "thinking 模式" appears zero times across the whole article library, and the English word "thinking" appears in 23 articles, all in ordinary senses and none in a tool-calling context (re-counted from the repository data for this article). Article #566 covers the temperature parameter and never mentions the thinking switch; article #555 covers parallel requests (T5, `num_parallel`) and never mentions thinking mode. T3's variable is "the thinking-mode switch" and its outcome is "how many of five runs return `tool_calls`" — no neighbouring article has that variable combination.

Auxiliary observations

These are useful supporting observations. They are deliberately not counted among the three decisive tests.

The schema is not a contract. A small model will pick the wrong tool and violate `enum` and `maximum` limits, while still returning HTTP 200 with a formally valid `tool_calls` (hvr.biz measurement: five test requests all returned HTTP 200, all valid tool calls, but with the wrong tool picked or the limits violated). It is deliberately not counted among the three tests: it targets "working badly", not "working or not working", and the article tells the reader to validate the returned values themselves rather than trusting the schema.

Streaming does not stream tool calls. With `"stream": true`, the whole `tool_calls` array arrives in the first chunk, and the second chunk is `done` — there are no incremental parameters (hvr.biz measurement). It is deliberately not counted among the three tests: it is only a client-parsing assumption, not a diagnostic test.

Open WebUI sends built-in tools by default. Open WebUI v0.13.3 sends its built-in tools with every message, so `smollm2:135m` returns "does not support tools" on the very first message; switching Function Calling to Legacy mode lets it answer (localaiscope measurement). It is deliberately not counted among the three tests: it is only the interface version of the T1 variable (the client sent extra tools), not an independent variable.

The three tests, in one table

TestVariable changedOutcome variablesWhat a positive result means
T1: model capabilityWhich model is used`tool_calls` returned, or HTTP 400 "does not support tools"Model-capability layer is the cause
T2: endpointWhich endpoint is used`tool_calls` returned or not; `arguments` object or stringEndpoint layer is the cause
T3: thinking modeThinking switch on or offCall count out of 5 runs on each sideThinking-mode layer is the cause — use the side with the higher count
Auxiliary: schema validationReturned values checked or notWrong tool or violated limits or notBehaviour layer — validate the return, do not blame capability
Auxiliary: streaming`stream` true or false`tool_calls` arrives whole in the first chunk or notClient-parsing assumption, not an Ollama fault
Auxiliary: Open WebUI built-in toolsBuilt-in tools on or Legacy modeFirst message returns 400 or answersClient sent extra tools — the T1 variable in interface form

Common misconceptions

  1. "I sent `tools`, so the model will definitely use them." Wrong. The model only calls a tool when it judges one is needed — for a question that needs no tool (for example "Write one sentence about the sea"), qwen3:0.6b answers in plain text and calls nothing (localaiscope measurement). Not calling does not mean not being able to call.
  2. "An HTTP 400 error means Ollama is broken." Wrong. HTTP 400 "does not support tools" is the server telling you the model does not support tools. It arrives in 2 milliseconds and is a correct refusal, not a fault — the fix is to change the model, not to reinstall.
  3. "The `tools` field works on any endpoint." Wrong. `/api/generate` has no such parameter, and an old server (v0.2.0 and earlier) silently drops it — HTTP 200 with a text answer, not HTTP 400.
  4. "Thinking on is always better — or always worse." Wrong. The direction changes with model size, version, and runtime stack: a small model got worse with thinking on (1 of 5 calls), a 4B model got nothing from it and ran 5 times slower, and a 35B model on MLX improved from 73.96% to 95.83%. Measure five runs on each side in your own environment; do not copy any one source's direction.
  5. "If the schema is written well, the model will always follow it." Wrong. A schema is only a hint, not a contract — a small model will violate `enum` and `maximum` limits and still return HTTP 200. The program must validate the returned values itself.
  6. "If the model can call a tool, it will execute it itself." Wrong. The model only writes down which function it wants called; execution is your program's job, and so is the safety responsibility — never hand a tool with side effects to an unverified return value.

Boundary cases: what this article is not

SituationWhich route appliesWhy it is not this article
Cannot reach the Ollama API at all (localhost:11434 gives no response)#565Connection layer — tool calling only comes up after a connection succeeds
The model loads but runs on the CPU, with the graphics card idle#556`num_gpu` layer, not the tools layer
The model unloads after a while, and every question reloads it#555`keep_alive` lifecycle, not the tools layer
The model cannot load at all, or inference runs out of memory#552 / #553Allocator / budget layer, not the tools layer
The answer stops halfway (truncation)#566Generation-parameter layer — truncation and tool calling are two different kinds of stopping and must not be mixed
A vision model fails to read an image#569 (same batch)The `images` field, not the `tools` field — the same tool family, a different API field
Answer quality is poor, rambling, or repetitiveGF14 (temperature parameter, backup)Quality layer, not the tool-calling layer
Truncation on the OpenAI-compatible endpoint (`max_tokens`)#566, section 11That side uses `max_tokens`, not `num_predict` — this article covers only the native `/api/chat` `tools` field, and mentions the compatible endpoint only for the `arguments` shape
MCP servers or an external tool protocolNot Ollama toolsMCP is a different protocol, not Ollama's `tools` array
The tool itself fails when executed (the function errors, or returns an error)Client programThe model only writes down which function to call; execution is your program's responsibility, not a model problem

Neighbour articles and the boundary map

This article is #570, and its companion in the same batch is #569, which covers a vision model that fails to read an image. The two share a batch and a diagnostic style — five layers, seven steps, decisive tests — but nothing else: one is the `images` field, the other is the `tools` field, and they share no test, no variable, and no outcome.

The closest neighbours, read closely. Article #566 is the Ollama truncation article. It covers `/api/chat` parameters (`num_predict`, stop sequences, client timeouts), and its boundary section explicitly separates truncation on the OpenAI-compatible endpoint (`max_tokens`, not `num_predict`) — but it never mentions the `tools` field. Its variable is the generation-stopping rule, and its outcome is the truncation point and `done_reason`; this article's variable is the `tools` field, and its outcome is whether `tool_calls` is returned. Article #565 is the Ollama API connection article: bind address, listening, firewall, client URL — it never mentions the request content. Article #556 is the Ollama runs-on-CPU article: three `num_gpu` settings (Modelfile `PARAMETER num_gpu`, API `options.num_gpu`, client control) and the `ollama ps` PROCESSOR column — it states three settings, but the Capabilities column is not one of them; `ollama show` Capabilities is a different check. Article #555 is the Ollama lifecycle article: its test T5 covers parallel requests (`num_parallel`) — the variable is "how many requests at once" and the outcome is "whether it stays loaded"; this article covers a `tools` array inside a single request. Articles #554, #553, #179, and #561 were also checked, and none of them mentions `tool_calls` or `tools` in a tool-calling context.

The library scan. Across the whole article library, re-counted from the repository data for this article: "tool_calls" appears zero times in Chinese and zero times in English; "does not support tools" appears zero times in both languages; "function calling" appears zero times in both languages; "工具呼叫" appears zero times in Chinese; "thinking 模式" appears zero times in Chinese, and the English word "thinking" appears in 23 articles, all in ordinary senses and none about a model's thinking mode or tool calling; "/api/generate" appears only in articles #555 and #566 in both languages; "ollama show" appears only in articles #556 and #566 in both languages, and in both cases it is used for something else — #556 for `ollama show --modelfile` to read `PARAMETER num_gpu`, #566 for `ollama show --parameters` to read `num_predict` — neither mentions the Capabilities column. The counts are per article, case-sensitive, and the Chinese and English libraries were counted separately (530 Chinese articles, 547 English articles, maximum ID 568 in both).

Sources and honesty gaps

The facts in this article come from the following sources, checked by search on 2026-11-24: localaiscope, "Ollama Tool Calling: the full loop, tested (v0.40.16)" (2026-11-20, re-checked 2026-11-24), at https://localaiscope.com/en/setup/ollama-tool-calling/, for the symptom shape (qwen3:0.6b supports tools, gemma3:270m does not; the gemma3:270m request returned HTTP 400, `{"error":"registry.ollama.ai/library/gemma3:270m does not support tools"}`, within 2 milliseconds, with nothing generated), for the `ollama show` Capabilities column, for the 2026-11-20 list of models carrying a `tools` label (qwen3, qwen2.5, llama3.2, granite4, smollm2, and not gemma3), for the question that needs no tool ("Write one sentence about the sea."), answered by qwen3:0.6b in plain text with no call, and for tool support being added in July 2024; hvr.biz, "Local LLM Function Calling: Wiring a Self-Hosted Model to Real Homelab Actions" (Ollama 0.40.16, qwen2.5 0.5B and 1.5B, re-checked 2026-11-24), at https://www.hvr.biz/articles/topic.php?slug=local-llm-function-calling-wiring-a-self-hosted-model-to-rea, for "A JSON schema in the request is a hint to the model. It is not a contract." and the small model violating `enum` and `maximum` while still returning HTTP 200, for the same HTTP 400 on gemma3:270m, for "Streaming does not stream tool calls" (the whole `tool_calls` array arrives in the first chunk), and for `/v1/chat/completions` returning `arguments` as a JSON string against the native API's JSON object, with a `TypeError` if the parsing is not switched; baeseokjae, "The Chat Template or a Built-in Parser Decides Whether Ollama Gives You a Tool Call" (updated 4 days before the check, measured on Ollama 0.20.3, re-checked 2026-11-24), at https://baeseokjae.github.io/posts/ollama-chat-template-tool-support-probe-2026/, for the HTTP 400 message `registry.ollama.ai/library/<model>:latest does not support tools`, for v0.2.0 and earlier silently dropping the `tools` field (HTTP 200 with a text answer, no `tool_calls`), for the capability coming from a template `.Tools` block or a built-in parser (cogito, gemma4, deepseek3, lfm2, ministral), and for the check `ollama show --modelfile qwen2.5:0.5b | grep -c '\.Tools'` together with `ollama show qwen2.5:0.5b | sed -n '/Capabilities/,+3p'`; automater.ai, "Ollama Does Not Support Tools: Diagnose and Fix It" (re-checked 2026-11-24), at https://automater.ai/intel/ollama-does-not-support-tools-error/, for the same HTTP 400 error, the `ollama show` check, and the Open WebUI built-in-tools trap (turn off Builtin Tools capability for small models in Admin → Models, or switch to Legacy mode); localaiscope, "Open WebUI with Ollama in Docker, tested offline (v0.13.3)" (2026-11-13, re-checked 2026-11-24), at https://localaiscope.com/en/setup/open-webui-ollama/, for `smollm2:135m` returning `registry.ollama.ai/library/smollm2:135m does not support tools` on the first message because Open WebUI sends built-in tools by default, and for it answering after Function Calling was switched to Legacy mode; jacar.es, "Ollama function calling: local guide + example" (129 days before the check, re-checked 2026-11-24), at https://jacar.es/en/function-calling-with-ollama-locally/, for tool support being added on 2024-07-25, for the first supported models (Llama 3.1, Mistral Nemo, Firefunction v2, Command-R+), for the most reliable local tool models in 2026 (qwen3, llama3.3, mistral-small3.2, gemma3, granite4), and for "The small models that fit on your machine are less reliable than frontier APIs: they sometimes skip the call or produce malformed arguments, so always validate what they return."; bigiron.cc, "Local Model Tool Calling, Measured" (2026-10-24, re-checked 2026-11-24), at https://www.bigiron.cc/guides/local-model-tool-calling-accuracy-measured, for the Qwen3-4B Q4 thinking-mode measurement (basic group 19 of 20 with thinking on against 20 of 20 with it off, 5 times slower, one request taking 11 minutes) and for "Thinking mode bought nothing here and cost a lot: the 4B with thinking was five times slower, and one request took 11 minutes."; hackbig, "A lenient parser rescued 0 of 75 Qwen3.6 tool-call misses in MLX" (2026-10-27, re-checked 2026-11-24), at https://hackbig.com/blog/local-tool-call-accuracy-m3-max, for the Qwen3.6-35B-A3B measurement on MLX over 96 tool-call tasks (thinking off 73.96% accuracy, thinking on 95.83%, 3.57 times slower) and for all 75 failures being `skipped_needed_call`; and srikarmk.dev, "The First Call Is Easy" (2026-10, re-checked 2026-11-24), at https://www.srikarmk.dev/projects/tool-call-reliability, for single calls succeeding 92–100% of the time while multi-step chains fall (qwen3 8B two-step chain 25%, three-step chain 12%), and for 30B thinking models not falling on chained tasks.

Four honesty gaps must be stated plainly. First, there was no local reproduction: no Ollama tool call was run on a local machine for this article, so the HTTP 400 error, the Capabilities column, the `tool_calls` shape, and the thinking-mode comparison figures all come from the external sources listed above; the localaiscope and hvr.biz figures come from Ollama 0.40.16, small models (0.5B–1.5B and 0.6B), and CPU or 2-vCPU environments — a different model size, a different version, or a different runtime stack may behave differently, so this article describes the comparison design and does not fix one environment's figures as absolute claims. Second, the thinking-mode direction changes with model, version, and runtime stack (see the three-way table in T3): this article's T3 describes only the measurement method and never writes "thinking on is better" or "thinking on is worse" as a conclusion. Third, the tools-label list changes with version: this article does not fix which model has `tools`, and the reader must check with `ollama show` on their own version. Fourth, two sources disagree on gemma3 in a way that is only apparent: localaiscope (2026-11-20) says smollm2 has the label and gemma3 does not, while jacar.es (2026) lists gemma3 among the most reliable tool models — the two are reconciled by size and version (gemma3:270m has no label, a larger gemma3 may have one; and gemma4 has a built-in parser), so this article tells the reader to check their own model rather than copying either list.

Frequently asked questions

The model answers in plain text but never calls the tool. Is something broken?

Not necessarily. First check which of the two shapes it is: an HTTP 400 "does not support tools" means the model has no tools capability, and the fix is to change the model; an HTTP 200 plain-text answer with no error means the endpoint or the thinking mode must be checked with T2 and T3. A model that answers plain-text questions normally is running and loaded — the fault is in the `tools` layer, not the server.

How do I check whether my model supports tools?

Run `ollama show <model>` and look for `tools` in the Capabilities column, or run `ollama show --modelfile <model>` and check whether the template has a `.Tools` block. A model with a built-in parser (cogito, gemma4, deepseek3, lfm2, ministral) can support tools even when its template has no `.Tools` block, so the Capabilities column is the check that counts. Do not copy a published list of models — the label changes with version and model size.

Why does `/api/generate` ignore my `tools` array?

Because `/api/generate` has no `tools` parameter. It silently ignores the field and answers in plain text, without any error. Only `/api/chat` accepts `tools`. An old server (v0.2.0 and earlier) also silently drops the field even on `/api/chat`, so check the server version with `ollama --version` before concluding that the model is at fault.

Does thinking mode help or hurt tool calling?

It depends on the model, the version, and the runtime stack — measure it, do not assume it. Three sources point three ways: a small model (qwen3:0.6b) called only 1 of 5 times with thinking on; a 4B model got nothing from thinking (19 of 20 against 20 of 20) and ran 5 times slower; a 35B model on MLX improved from 73.96% to 95.83% with thinking on. Run test T3 on your own setup — five runs with thinking off, five with it on — and read your own numbers.

The model called the tool but picked the wrong one, or the parameters were wrong. Is that the same problem?

No. That is the behaviour layer, not the capability layer. A schema is a hint, not a contract: a small model can violate `enum` and `maximum` limits and still return HTTP 200 with a formally valid `tool_calls`. Validate the returned values in your own program, reduce the number of tools, and write clearer descriptions. Do not treat a wrong pick as proof that the model cannot call tools at all.

Why doesn't streaming deliver `tool_calls` piece by piece?

Because streaming was not designed that way for tool calls. With `"stream": true`, the whole `tool_calls` array arrives in the first chunk, and the second chunk is `done` — there are no incremental parameters. A program that waits for the parameters to arrive gradually will wait forever. Read the full `tool_calls` array from the first chunk.

I have run all three tests and still cannot separate the cause. What now?

Record six things — the model name, the `ollama show` Capabilities output, the server version (`ollama --version`), which endpoint is used, whether thinking is on or off, and the full error message — and bring those notes to a check. Do not reinstall Ollama or the model one after another — reinstalling cannot change whether a model supports tools. If there is a hardware suspicion (for example, the machine itself is unstable, or the graphics card behaves abnormally while the model is running), the machine can be taken to the workshop for a further check.

Conclusion

An Ollama tool call that never happens is a three-variable problem with a fixed shape: a `tools` array is sent, plain-text questions work, and the reply is either a hard HTTP 400 refusal or a silent plain-text answer. The three comparisons in this article — a model-capability comparison, an endpoint comparison, and a thinking-mode comparison — separate the capability layer, the endpoint layer, and the thinking-mode layer, with the reply's `tool_calls` field as the only judge, and each one changes exactly one variable on the same request. The thinking-mode result is kept honest too: three sources point three ways, so the article never writes a direction as a conclusion — it tells the reader to run five runs on each side and read their own numbers.

When to seek professional help: if the model cannot load at all, if inference ends with an out-of-memory error, or if all three tests fail to separate the cause — or if the machine crashes, or the graphics card behaves abnormally while the model is running — the problem is no longer a tool-calling setting. It may involve the driver, the installation, or the hardware itself, and is worth having checked by a technician.

If the tests point to a hardware fault rather than a setting — the graphics card is not detected, the machine crashes, or the model fails with an error that no setting changes — the graphics card and the setup can be checked at the Shek Mun workshop: Dali Plaza, Room 1209, Shek Mun, Hong Kong. Phone 2186 8010, WhatsApp 6558 6806. Diagnosis and repair pricing follows the workshop's published three-tier range of HK$400–HK$2,800, quoted before any work begins.

Related articles

Related services

If you need Chip-level GPU repair, see these service pages: