A small transformer maps (query, tool list) to a JSON call, entirely client-side — no server, no API key, no data leaving your device. Both Needle v2 and Needle v1 are here, from the same needle-rs WebAssembly module — pick one and compare.
How confident the model is in its own answer — the head scores the call it produced, not the question. Gate on it: act above your threshold, escalate below.
Cosine similarity between the query and each tool description, from the contrastive head. Useful for narrowing a large tool catalogue before the call.