Tool use (function calling)
The model returns a structured request to run a function you defined; your code runs it.
You describe tools with a name, a description and a JSON schema for the input. The model never runs anything itself: it emits a call with arguments, and your code decides whether and how to execute it. Tool descriptions are prompts too, and they decide how well the model picks tools.
Related terms
- MCP (Model Context Protocol): An open protocol for plugging tools and data into AI apps: write a server once, use it from any client.
- Structured outputs: The model’s answer is constrained to match a JSON schema you provide.
- Agentic loop: The cycle of model call, tool call and result that an agent repeats until it stops.
