Skip to main content
AI & Agents

Tool Calling

Tool calling is the mechanism that lets a language model invoke external functions — querying a database, calling an API, sending an email. The model returns a structured request naming the tool and its arguments; the application executes it and returns the result, which the model then reasons over. It is what turns a text generator into an agent.

Also called function calling, this is the boundary where a model stops describing and starts doing. The model never executes anything itself; it emits a structured request that your code chooses to run. That indirection is the entire security model, and it is why enforcement belongs in the tool layer rather than in the prompt — a spend cap checked server-side holds even when the model is wrong or has been manipulated.

Tool quality drives agent quality more than model choice does. Loosely typed tools with vague descriptions are the most common cause of behaviour that gets blamed on model hallucination; usually the model was guessing at an ambiguous interface. Strict schemas, predictable errors and descriptions that state when to call the tool — not just what it does — produce markedly more reliable agents.

Codazz builds this in production — MCP & Tool Integration.

FAQ

Tool Calling
FAQ.

Common questions about tool calling.

Ask Us Anything

Yes — the two terms describe the same mechanism and are used interchangeably across providers. A model returns a structured request naming a function and its arguments, your application executes it, and the result is returned to the model. Different vendors favour different names, but the pattern and its implications are identical.

By not exposing it as a tool, or by requiring an approval token the model cannot issue to itself. Limits — spend caps, rate limits, row-count ceilings — must be checked server-side on every call. Instructions in a prompt are not a control; the design assumption should be that the model will eventually be wrong or manipulated and the tool layer has to hold regardless.