Tool calling vs function calling vs structured output — what changed in 2025?
780 views
31 of 83
1
The problem
Question presented to candidate:
"People on the team use 'function calling', 'tool calling' and 'structured output' as if they were the same thing. Untangle them for me: what does each one mean, how are they related, and what actually changed in the APIs during 2025 that we should design around?"
What a strong answer should cover:
Function calling is OpenAI's original 2023 name; tool calling (Anthropic: tool use) is the general name for the same mechanism: the model emits a structured request naming a tool and its arguments, and your code executes it
Structured output constrains the model's final answer to a JSON Schema; a tool call's arguments are themselves structured output, which is why the old way to get structured answers was a forced tool call
The milestones: functions (June 2023), tools/tool_choice with parallel calls and JSON mode (November 2023), strict schemas for both answers and tool arguments (OpenAI, August 2024), MCP for sharing tools (November 2024)
What changed in 2025: OpenAI's Responses API with flat tool definitions and function_call items, MCP tool output schemas, Gemini JSON Schema on all active models, Anthropic structured outputs and strict tool use, and SDKs folding structured output into the normal text call
The design rule that follows: tools for actions and data the model needs, structured output for the shape of the answer; keep one internal tool and schema definition and adapt it per provider
Code / implementation expected: Optional — mapping one tool definition to two providers' formats, or showing a tool-call loop next to a schema-constrained answer.
tool-calling
function-calling
2
Try it yourself
Sketch your approach before you read the solution. That is what the interview tests.
Stuck? Get a hint.
A short nudge toward the approach. It will not give the answer away.
3
Solution
Target Audience: Engineers who keep meeting three overlapping names in docs, SDKs and interviews and want one clear mental model plus an accurate timeline.
Difficulty: Medium
Verified with: Node 22.22.0 and Python 3.12.3 (the wire-format adapter below, run against canned API responses). Dates and API shapes are cited inline with their source, checked October 2026. The title says 2025; this answer covers 2025 and notes what has changed since.
How to read this doc: Every idea is explained in plain language first, then tagged with 📌 Interview term: so you also learn the words an interviewer expects. All program output shown was produced by actually running the example; the Verified section quotes it in full.
1. Why This Even Matters — A Story First
Think of a restaurant kitchen. A waiter can do two different things with an order slip. They can hand it to the k
The solution is hidden so you can try first
15 min read · 10 sections
4
Read the code
One tool, three wire formats, one internal ToolCall type