Function calling / tool use
Also known as: tool use
What is Function calling / tool use?
A way for a model to trigger real actions by returning a structured request to run a tool you have defined: query a database, send an email, call an API. The model decides when a tool is needed and with what inputs. Your code runs it and hands back the result. This is the mechanism that turns a chatbot into an agent.
Why it matters
Once a model can trigger real actions, it becomes genuinely useful and genuinely risky at the same time, and both come from the same feature. A chatbot that only talks can at worst give a bad answer. One that can query a database, send email or call an API can take a wrong action in the world, and it chooses when to act based on text it was handed, some of which may come from untrusted sources. So most of the engineering around tool use is about limits: which tools the model may reach, what inputs are validated before they run, and which actions need a human to approve first. The ability to act has to be designed together with its constraints, not have them bolted on afterwards.
In practice
An operations team lets an assistant look up order status and, later, issue refunds. The read-only lookup ships with light oversight. The refund tool does not: it is capped at a set amount, logs every call, and routes anything larger to a person. That split, safe actions automated and consequential ones gated, is the everyday shape of putting tool use into production responsibly.