Skip to content

Function/tool calls are ignored or malformed

Symptom

The model answers in prose instead of calling the tool, or arguments are broken.

Likely causes

  • Model not trained for tool use
  • Tool template not applied (missing --jinja)
  • Too many or poorly described tools

How to fix it

  1. Use a model known for tool support (Llama 3.1+, Qwen2.5+, Hermes-style).
  2. Start llama-server with --jinja; use the right --tool-call-parser in vLLM.
  3. Reduce the tool list; write short, precise descriptions; set temperature to 0.
  4. Validate arguments and re-prompt with the error.
bash
llama-server -m model.gguf --jinja -ngl 99

Still stuck? Check the lessons or measure first with the benchmark lab.