2:25 What Is Function Calling?
LLM Function Calling
Function calling lets LLMs invoke external functions or APIs based on conversation context. Instead of just generating text, the model can decide to call a weather API, search a database, or execute code — then use the results to formulate its response.
Learn ChatGPT & LLMs from these channels
How Function Calling Works
You define available functions with names, descriptions, and parameter schemas. When the user asks 'What's the weather in Tokyo?', the model returns a structured function call: {name: 'get_weather', arguments: {city: 'Tokyo'}}. Your code executes the function and feeds the result back to the model.
Key Concepts
- Tool Schema — JSON schema defining available functions — name, description, and typed parameters
- Tool Choice — Whether the model must call a tool, can choose to, or should never call one — configurable per request
- Parallel Tool Calls — Some models can invoke multiple functions simultaneously for efficiency
Learn Function Calling — Top Videos
Frequently Asked Questions
Is function calling the same as MCP?
Function calling is the LLM capability. MCP is a protocol for organizing and serving tools to AI clients. MCP uses function calling under the hood, but adds discovery, authentication, and standardization.
Which LLMs support function calling?
GPT-4o, Claude 3+, Gemini, and most major LLMs support function calling. The exact implementation and reliability varies by model.