FF/Demystified

Function calling / tool use

How a model stops narrating what ought to happen and actually sets it in motion. The bridge between language and action.

Function calling is how a language model asks your software to actually do something. Instead of writing “I would need to look up policy 42,” the model says call get_policy(policyId=42) — a structured request your application can act on. You run the function, hand the result back, and the model picks up from there.

It’s the bridge between language and action. Without it, a language model is a writer. With it, a language model is an operator.

Why it matters now

Function calling is what turned chatbots into agents. Hand a model a menu of tools (here’s send_email, here’s lookup_customer, here’s schedule_meeting), let it pick which one to reach for and when, and you have an agent loop. That’s the whole trick. Everything in the agentic AI category runs on it: coding agents, claims-triage agents, research agents.

The model isn’t executing your code. It’s deciding which of your functions to call and with what arguments, based on the conversation. You still own the function. You still own the permissions. You still own what happens when the function fails. The model owns the decision of when to invoke.

The misuse

A common mistake is to define one function, do_the_thing(parameters), and call the result function calling. That’s RPC with a natural-language wrapper. Real function calling means defining a menu of small, composable functions and letting the model sequence them.

The other failure mode is treating the tool definitions as documentation. The function descriptions you write are part of the prompt. “Sends an email” is a worse description than “Sends a transactional email to a single customer; do not use for marketing.” The model follows the description you wrote, not the one you meant.