Tool calling lets a model ask the host application to run a function, such as reading a file or querying an API, by emitting a structured call that matches a declared schema. The model never executes anything itself. The application does, so the host's validation, authorization, and approval logic is the real security boundary.
Read in this order
- OfficialTool use with Claude (Claude Platform Docs)Start here: the request and result cycle between model and host application.
- ArticleWriting effective tools for AI agents (Anthropic)How tool design shapes agent behavior, with lessons from real use.
- OfficialFunction calling (OpenAI API)The same pattern from another vendor, to see what stays constant across APIs.