Foundations
Tools and Function Calling for AI Agents
How agents move beyond text by invoking APIs, databases, browsers, and application functions.
Tools turn intent into action
A tool is a capability the model can request through a defined interface. Examples include searching a knowledge base, reading a calendar, running a calculation, or drafting a change for approval.
Schemas create a contract
Function calling constrains a request to a tool name and typed arguments. Clear names, narrow parameters, and useful validation errors make correct tool selection much more likely.
Execution stays outside the model
The host application decides whether a call is authorized and performs the actual operation. It should treat model-generated arguments as untrusted input and return concise, structured results.