AI Terms

Featured termA fresh pick each visit

Tool use / function calling

  • Modern AI
  • Agents
  • Standard term
2 steps

Tool use, also called “function calling,” is how an AI model asks for a named action with specific details, such as send_email with a recipient and subject, and gets the action's result back to work with.

A tool call is a structured request, not evidence that the action happened. Software around the model checks the request according to its rules, runs an allowed action, and returns the result. The quality of those rules determines which mistakes are blocked.

Where you’ll meet it

You ask your assistant for Saturday's forecast in Portland, for a hike you're planning. A small line under its answer reads “Searched the web.” When you open it, the search was for Portland, Oregon, and you live near Portland, Maine.

What to do

The city in the search was the model's guess at what you meant. Tell it which Portland and ask again. For actions that change things, such as sending or booking, turn on the setting, where your assistant has one, that shows you each request and waits for your OK.

Easy to mix up

Structured output is an answer delivered in a set data layout. Tool use sends data to request an action, such as sending an email, and gets that action's result back.

Check yourself

Your assistant replies, “Done, I've emailed the caterer.” Which tells you more reliably whether the email went out?

Go deeperA call can pick the wrong tool or fill in wrong details

OpenAI added function calling in 2023 to its API, the service programs use to reach its models, and other providers offer the pattern. Tools are described by a name, a description, and a schema specifying accepted inputs and their types. Vague descriptions can make selection less reliable, while even a well-formed request can ask for the wrong action.

Even with the right tool chosen, the model can fill in a detail in the wrong form, such as a date in an unexpected format, or supply an ID it never looked up. Builders keep each tool's action narrow and try calls with missing, malformed, and repeated details before a tool touches anything live.

Sources

Practice a mix of every set