gitwtfhub

wtf is toolhound?

code-byte404/toolhound — explained in plain English

Analysis updated 2026-05-18

7PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A diagnostic tool that runs on Apple Silicon Macs and explains exactly why a small language model failed a tool call: template bug, parser gap, or the model itself.

Mindmap

mindmap
  root((repo))
    What it does
      Attributes tool call failures
      Four failure causes
      Bootstrap confidence intervals
    Tech stack
      Python
      MLX
      Apple Silicon
    Use cases
      Diagnose model vs framework bugs
      Compare small model reliability
      Benchmark decoding fixes
    Audience
      AI engineers
      Model researchers
      Developers
    Setup
      Apple Silicon Mac
      arm64 conda env
      pip install dev extras

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Diagnose whether a small model's tool-calling failures come from the model, the chat template, or the parser.

REASON 2

Compare tool-calling reliability across multiple small models with reproducible, bootstrap confidence intervals.

REASON 3

Benchmark whether a fix like grammar-constrained decoding actually improves tool-calling versus baseline.

What's in the stack?

PythonMLXApple Silicon

How it stacks up

code-byte404/toolhoundalx-code/lingbot-video-1.3b-fp8andrevicencio/tmux-flash
Stars777
LanguagePythonPythonPython
Setup difficultymoderateeasy
Complexity3/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an Apple Silicon Mac (M1 or newer) running an arm64 environment, MLX will not run on Rosetta.

Apache License 2.0: free to use, modify, and distribute, including commercially, as long as you preserve copyright and license notices.

Wtf does this do

Toolhound is a diagnostic tool for figuring out why small AI language models fail at calling external tools or functions. Most benchmarks report a single accuracy number, something like a model getting 71 percent of tool calls right, but that number does not explain why the other calls failed, and the reason matters a lot for deciding what to fix. Toolhound runs entirely on an Apple Silicon Mac using the MLX framework and attributes every single failed tool call to one of four specific causes. Those four causes are: a bug in the chat template that mangles how tool related tokens are formatted, a gap in the framework's parser that misses a call the model actually got right, the model producing output that cannot be parsed as a valid call at all, or the model producing a valid call but choosing the wrong tool or wrong arguments. Only the last two are genuinely the model's fault. The first two are framework or template bugs that should be fixed upstream rather than blamed on the model. The tool separates these by using a lenient parser to check whether any reasonable parser could have rescued the output, while a stricter scorer separately judges whether the answer itself was correct. The README gives real examples from testing several small models: one model appeared unable to handle multi-turn tool calls, but the actual cause was its chat template silently dropping a prior call. Another appeared to produce invalid output, but the real problem was the parser missing a valid array format it used. A third model genuinely picked wrong arguments, which is a real model limitation that changing the parser cannot fix. To use it, you need an Apple Silicon Mac running macOS 14 or newer with Python 3.11, since MLX only runs on Apple's own chips. After cloning the repository and installing dependencies, you run a reliability check across several models, then an attribution command that names the specific cause behind each failure. Reports are written as both machine readable JSON and human readable markdown files, each stamped with the exact hardware, software versions, and model revisions used, so the results can be reproduced. It is licensed under Apache 2.0 and is currently a version 2 pre-release.

Yoink these prompts

Prompt 1
Help me set up an arm64 conda environment and install toolhound on my Apple Silicon Mac.
Prompt 2
Walk me through running toolprobe run and toolprobe attribute on a model I want to evaluate.
Prompt 3
Explain the difference between model_format_failure and model_decision_failure in this project's attribution scheme.
Prompt 4
Show me how to add a new model with its own native tool-call format to src/toolprobe/cli.py.

Frequently asked questions

wtf is toolhound?

A diagnostic tool that runs on Apple Silicon Macs and explains exactly why a small language model failed a tool call: template bug, parser gap, or the model itself.

What language is toolhound written in?

Mainly Python. The stack also includes Python, MLX, Apple Silicon.

What license does toolhound use?

Apache License 2.0: free to use, modify, and distribute, including commercially, as long as you preserve copyright and license notices.

How hard is toolhound to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is toolhound for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.