Function calling (tool use)
Last verified: June 2026· definition
With function calling (also called tool use), you describe available tools to the model; when appropriate, it returns a structured request to call one with specific arguments. Your code runs the tool and feeds the result back, often in a loop.
It’s the mechanism behind agents and most LLM integrations with real systems. MCP builds on top of it by standardizing how those tools are exposed and discovered across clients.
Reliable tool use depends on clear tool descriptions, validated inputs, and graceful error handling so the model can recover when a call fails.