Function Calling
A model feature that allows it to request the execution of developer-defined functions with structured arguments.
Full Definition
Function calling (also called tool calling) lets developers define a set of functions — with names, descriptions, and parameter schemas — and pass them to the model. When the model determines that a function is needed to answer the user, it outputs a structured JSON call with the function name and arguments rather than a prose answer. The developer executes the function and returns the result to the model, which then uses it to form a final response. This enables LLMs to take actions — searching the web, reading files, querying databases, calling APIs — making them practical for agentic applications. OpenAI popularised the feature; Anthropic calls it 'tool use'.
Examples
Defining a get_weather(city: str, unit: str) function; the model calls it with {'city': 'London', 'unit': 'celsius'} when asked about London's weather.
An AI assistant using function calling to fetch a user's calendar events, then summarising the week's schedule in natural language.
Apply this in your prompts
PromptITIN automatically uses techniques like Function Calling to build better prompts for you.