How Function Calling (Tool Use) works.
Function calling lets AI models take actions, not just generate text. You define available functions with their parameters, and the model decides when to call them. Example: a travel assistant with functions like searchFlights(origin, destination, date) and bookHotel(city, checkin, checkout). The model parses user intent, selects the right function, and extracts parameters. OpenAI, Anthropic, and Google all support this. It's the foundation of AI agents.
Where it helps.
- 01AI agents that take actions
- 02Database queries from natural language
- 03API orchestration
- 04Multi-step workflows