Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
AI Builder

AI builder glossary

Tool use (function calling)

Letting a model request calls to functions you define, such as a database lookup or API action, with your code running them and returning the results.

With tool use, you describe functions to the model: a name, a description, and a schema for the arguments. When the model decides a tool would help, it responds with a tool call instead of a final answer. Your code runs the function, sends the result back, and the model continues with real data in hand. The model never executes anything itself.

This is how AI features reach beyond text. Tools let a model look up an order, search a knowledge base, check inventory, create a ticket, or query analytics, which fixes the knowledge-cutoff problem and grounds answers in live data. Tools are also a clean way to get structured choices, like which UI component to show.

The design work is in the tools themselves. Clear names and descriptions matter more than clever prompts. Scope every tool to the current user's permissions in your code, never trusting the model to pass the right account ID. Require confirmation for actions with consequences, validate arguments, return useful errors, and cap the number of steps.

Start with a few well-defined tools. Dozens of overlapping ones confuse the model, cost tokens on every call, and widen what an injected instruction could trigger.

Example

A support assistant gets three tools: look up an order by number, search help articles, and draft a refund request. The refund tool only creates a pending request that a human agent must approve.

Learn more in the course

Related terms

Go from definitions to doing

Learn to build AI-powered apps in 132 practical lessons.