Skip to content

Command Palette

Search for a command to run...

← All concepts
Concept

Function Calling

Synonym for tool calling — the LLM API feature that returns structured function invocations.

Simple explanation

Function calling and tool calling are the same thing. 'Function calling' was OpenAI's original term; 'tool calling' is the newer, broader term. Both mean the model decides to invoke a function you've defined.

Engineering explanation

Function calling was introduced by OpenAI in 2023. The model is given function definitions (name, description, parameters schema) and returns a structured response with the function name and arguments. Anthropic, Google and others adopted the same pattern. The term 'tool calling' is now preferred as it's more general (tools can be APIs, databases, file systems, etc.).

Example

Define function get_weather(city) → model returns {name: 'get_weather', arguments: {city: 'Tokyo'}} → you execute.

When to use it

Same as tool calling — whenever the LLM needs to act or access external data.

Common misconception

Function calling and tool calling are NOT different features. They are the same thing with different names. Use 'tool calling' for clarity.

Related concepts
Learn this in depth