All glossary terms
Cross-cutting

Function calling

Function calling lets an LLM invoke external tools by emitting a structured request matching a function specification provided in the prompt. The model decides when to call a function, with what arguments; the host application executes the call and returns the result for the model to incorporate. Function calling is the foundation of agentic LLM applications.

Function calling shifted LLMs from 'generators of text' to 'orchestrators of tool use' starting with OpenAI's June 2023 release; Anthropic, Google, and others followed with similar APIs. The function spec is typically JSON Schema describing parameters and types; the model decides which function (if any) to call based on the user's request. Modern implementations support parallel function calling (multiple tools in one turn) and structured outputs that guarantee the response matches the schema. The pattern enables agents to read files, query databases, call APIs, run code — turning the LLM into a controllable executor of larger workflows.

Related terms