A mental model for deciding when a model should call a tool instead of just answering.
Shared by Parshu · Published Aug 1, 2026
Function calling lets a model request that your code run something — a database query, an API call, a calculation — and use the result to finish its answer. The decision isn't "should I use function calling" in general, it's "does this specific step need information or an action the model can't have on its own": Give it a tool when the answer depends on live or private data (today's date, your database, an internal API), requires a precise calculation a language model shouldn't be trusted to do in its head, or needs to actually change something (send an email, create a record). Don't give it a tool when the model already has everything it needs in the prompt or its training — adding tools it doesn't need adds latency (a round trip per call) and new failure modes (wrong arguments, tool errors) for no benefit. Design each tool's description as carefully as a prompt — a vague tool description gets called at the wrong times or with wrong arguments just as reliably as a vague instruction produces a bad answer. Keep the tool list short and specific to the task at hand rather than exposing every capability you have; a model choosing between 3 well-described tools is far more reliable than one choosing between 20.