Function calling
A specific type of tool use where an AI model is provided with a list of programming functions and intelligently generates the exact JSON arguments needed to execute them.
What it is
Function calling is the standardized API mechanism used by providers like OpenAI and Google. Developers pass a JSON schema describing available functions (e.g., get_weather(location)). The model analyzes the user's prompt, decides if a function is needed, and outputs a strictly formatted JSON object containing the parameters required to run that function.
When you would use it
You use function calling when orchestrating programmatic workflows where the AI serves as a routing engine, converting messy human intent into clean, executable code parameters.
Common operations
- Converting natural language into structured database queries.
- Triggering specific backend microservices based on chat input.