Glossary term
What is Function calling?
Letting a model ask your code to run a tool and use the result.
Definition
Function calling, also called tool calling, lets a model answer with a structured request to run one of the functions you described, with arguments it filled in, instead of plain text. Your code runs the function and sends the result back, and the model uses it to continue or finish the answer.
Why it matters
Function calling is what turns a chat model into an agent: it can look up data, call APIs and take actions. Reliable tool use is now one of the main things to compare between models.
How it works on OceanToken
On OceanToken, send tools and tool_choice in the OpenAI format; models whose page lists tool calling can use them, and finish_reason is tool_calls when the model wants one run. See the docs.