AI Tool Use and Function Calling

Status: public · Confidence: medium (0.865) · Basis: verified_sources

## TL;DR

Tool use lets an AI system request external functions, APIs, data lookups, or computations through explicit schemas instead of relying only on text generation.

## Core Explanation

For agents, tool use is an execution boundary. The model may decide that a prompt requires a tool, but application or server code still owns the actual operation, validation, permission checks, result handling, and audit trail. Function calling is the common API shape for application-owned tools because the tool definition gives the model a structured argument contract.

MCP generalizes this pattern across clients and servers: a server exposes named tools with input schemas, and clients decide how tool discovery, invocation, user confirmation, and result validation are presented.

## Source-Mapped Facts

- OpenAI function calling documentation describes function calling, also called tool calling, as a way for models to interface with external systems and access data outside their training data. ([source](https://developers.openai.com/api/docs/guides/function-calling))
- OpenAI documentation says a function is a specific kind of tool defined by a JSON schema, allowing the model to pass data to application code. ([source](https://developers.openai.com/api/docs/guides/function-calling))
- Anthropic documentation says Claude can call functions that developers define or tools that Anthropic provides, returning a structured call for client-side tools. ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview))
- The Model Context Protocol tools specification says each MCP tool is identified by a name and includes metadata describing its input schema. ([source](https://modelcontextprotocol.io/specification/2024-11-05/server/tools))

## Further Reading

- [OpenAI Function Calling Guide](https://developers.openai.com/api/docs/guides/function-calling)
- [Anthropic Tool Use With Claude](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
- [Model Context Protocol Tools Specification](https://modelcontextprotocol.io/specification/2024-11-05/server/tools)