Skip to content
Free Tool Arena

Glossary · Definition

Function calling

Function calling is the API pattern where you define functions (with JSON schemas), the AI model decides when to call them and with what arguments, your code executes them, and the result returns to the model. Same concept as 'tool use.'

Updated May 2026 · 4 min read
100% in-browserNo downloadsNo sign-upMalware-freeHow we keep this safe →

Definition

Function calling is the API pattern where you define functions (with JSON schemas), the AI model decides when to call them and with what arguments, your code executes them, and the result returns to the model. Same concept as 'tool use.'

What it means

Introduced by OpenAI in 2023, now standard across Anthropic, Google, Mistral, DeepSeek, Cohere. Pattern: define each function as { name, description, parameters: JSON schema }. Pass these alongside your prompt. Model returns either text (no function needed) or a structured function-call object. Your code dispatches, executes, returns the result, model continues. Modern frameworks (Vercel AI SDK, LangChain, Anthropic Agent SDK) abstract this.

Advertisement

Why it matters

Function calling is the bridge between LLMs and the rest of your software. It's what makes LLMs useful for anything beyond chat — query databases, send emails, run code, control deployments. Reliability depends on how well you describe each function (good descriptions + clean parameter docs make a huge difference).

Related free tools

Frequently asked questions

Function calling vs MCP?

Function calling is the protocol-level pattern. MCP is a portable layer on top: define your tools as MCP servers, they work across all clients.

Best for reliability?

Claude Sonnet 4.6 + Opus 4.7 lead on tool-use reliability over long loops. GPT-5 is competitive.

Related terms