Skip to content

Function calling

In OpenAI documentation, function calling (also called tool calling) is a mechanism that lets a model connect to external systems and access data outside its training data. The model returns a tool call with arguments, and the application runs the function and returns the result to the model.

Source content checked . English translation published 2026-10-27.

In business automation

In a function call, the model proposes a tool name and arguments in an agreed format. The application validates and performs the action, which makes it possible to separate understanding the request from authorization to act.

Examples

These examples illustrate a possible workflow. Adapt the connections and rules to your own systems.

Business process example

A customer asks about an order. The model requests a function with an order ID, and the server checks that the customer is authorized to view it before retrieving the status. The result is returned to the model so it can compose a reply.

Relevant tools

OpenAI Agents SDK
Function-based tools let you pass structured requests from the model to code and return a result.

What to check

  • Arguments that are valid in structure are not necessarily authorized. Check record ownership and permissions inside the function.

Related terms

Sources