Discuss your project

Glossary

Function Calling (Tool Use)

Function calling, also called tool use, is the ability of a language model to return a structured call to a previously described function instead of a text answer. The application executes the call and returns the result to the model.

October 25, 2026Function CallingTool UseAI AgentsInterfaces

A language model on its own knows neither today's stock levels nor free slots in the calendar. With function calling, it can request this information specifically: the application describes to the model which functions exist, and the model decides when it needs one of them and with which values. This turns a text generator into a building block that works together with databases, line-of-business applications, and APIs. Function calling is the technical foundation for AI agents and for standards such as the Model Context Protocol.

How does function calling work?

Using Anthropic's documentation for Claude as an example, a call proceeds in five steps:

  1. Describe the tool: The application passes a name, description, and an input schema in JSON Schema format, for example for a function "query order status" with the required field order number.
  2. The model decides: Based on the request and the description, the model decides whether it needs the tool. If so, it returns a structured call with the arguments.
  3. Execution by the application: Your own software checks the arguments, calls the real function, and receives a result.
  4. Return the result: The application sends the result to the model as a tool result.
  5. Answer: On this basis, the model formulates the answer or calls the next tool.

Anthropic distinguishes between tools that run in your own application and server tools such as web search or code execution, which the provider executes itself. A setting can force a specific tool to be used. A strict mode ensures that calls match the stored schema exactly. Other providers use similar methods under the name function calling.

Typical use cases

Risks

How companies implement function calling securely

How it differs

An API is a system's interface; function calling is the model's ability to address it specifically. The Model Context Protocol standardizes how tools are provided to many AI applications at once. Robotic process automation follows hard-coded workflows, whereas with function calling the model decides on the next step.

Sources

View AI assistance

EXPLORE THE GLOSSARY

Related Terms

More in Artificial Intelligence

All Glossary Terms

YOUR NEXT STEP

What should
work better
next?

Tell us briefly what you have in mind. We will assess it and suggest a sensible next step.