Beta
ConceptsReading · ~3 min · 71 words deep

Function Calling

The API mechanism that lets models invoke external tools by emitting structured JSON that matches a schema.

TL;DR

The API mechanism that lets models invoke external tools by emitting structured JSON that matches a schema.

Level 1

Function calling is how AI agents actually USE tools. You define function schemas (name, description, parameters) in the API request. The model decides when to call them and emits JSON matching your schema. Your code executes the call and feeds back the result. OpenAI standardized function calling in 2023; now every frontier provider supports it.

Level 2

Flow: (1) send request with function schemas, (2) model generates JSON tool call if it decides to use a tool, (3) your code validates + executes, (4) send result back as a tool message, (5) model continues or finishes. Parallel function calling (emit multiple tool calls per turn) reduces agent round-trips. OpenAI, Anthropic, Google, Mistral all support parallel calls. Quality of tool descriptions matters enormously · poorly described tools get skipped.

Level 3

JSON Schema draft-07 is the canonical format. Models trained on function calling show 95%+ schema compliance in 2026. Errors still happen at edge cases · required field missing, wrong enum value. Production systems validate before execution. Structured Outputs (OpenAI) guarantees schema validity by constraining decoding. MCP extends function calling with a standardized protocol for tool discovery and execution across clients.

The takeaway for you
If you are a
Researcher
  • ·JSON Schema draft-07 standard
  • ·Parallel calls reduce round-trips 2-5×
  • ·Structured Outputs guarantees schema compliance via constrained decoding
If you are a
Builder
  • ·Clear tool descriptions > clever prompting · biggest lever
  • ·Support parallel calls for agent latency wins
  • ·Validate every tool call before executing · safety critical
If you are a
Investor
  • ·Function calling + MCP = the agent interop layer
  • ·Quality converging across providers · less differentiation here
  • ·Orchestration frameworks (LangGraph, Agent SDK) are the new battleground
If you are a
Curious · Normie
  • ·How AI talks to outside tools like search or calculators
  • ·The building block of AI agents
  • ·Standardized across most AI providers
Don't mix them up
Function CallingvsTool use

Function calling is the API mechanism. Tool use is the capability. Synonyms in casual speech, different in precise usage.

Function CallingvsMCP

Function calling is per-vendor. MCP is a cross-vendor protocol standardizing how any client talks to any tool server.

Gecko's take

Function calling is solved infrastructure. The interesting problems moved up the stack · to orchestration, memory, planning.

Every frontier 2026 model yes. Older and smaller models have weaker schema compliance.