Function Calling
also called Tool use, Function calling API
The model-provider feature that makes structured tool calls reliable.
An API mode where you declare available functions and the model returns a structured call rather than prose. It is what turns "the model wrote JSON in a sentence" into an actual integration.
Function calling is the mechanism behind tool use. The model still only emits text — the difference is that the text is guaranteed to match the schema you declared, so your code can parse it safely.
The historical significance is worth keeping in view: this feature replaced an era of asking models to emit JSON in prose and parsing it with regexes that broke weekly. Once the provider guarantees the shape, tool use became ordinary software engineering.
From parsing prose to receiving a schema
Extracting structured data from an email.
The old approach scraped JSON out of a paragraph and failed on malformed output. Declaring a schema and letting the API return a validated call removes the failure mode entirely rather than reducing its frequency.
- docsFunction calling ↗
The application-managed tool cycle spelled out: define the function with a JSON Schema, receive the call, execute it yourself, return the output.
- docsFunction calling ↗
The model selects a declared function and supplies arguments. Useful as a cross-vendor reference showing the pattern is not one provider’s design.
- paperToolformer: language models can teach themselves to use tools ↗
Self-supervised learning of when to call an API, which one, with what arguments, and how to use the result — tool use as a learned behaviour rather than a prompt trick.
Tool Call
The model asking for a specific function with specific arguments.
Structured Output · JSON mode
Making the model return data your code can parse.
MCP · Model Context Protocol
An open protocol for plugging tools and data into any agent.
Tool
A function the model is allowed to call to affect the world.