>_TheQuery
← Glossary

Tool Calling

Agents

A capability that allows large language models to invoke external functions, APIs, or tools to perform actions beyond text generation.

Tool calling (also known as function calling) is a feature of modern large language models that enables them to interact with external systems by generating structured requests to invoke specific tools. Instead of only producing text responses, the model can decide when to call a tool, specify the required arguments, and incorporate the tool's output into its response.

When a model supports tool calling, the developer defines a set of available tools with their names, descriptions, and parameter schemas. During inference, the model analyzes the user's request and determines whether any tools should be invoked. If so, it outputs a structured tool call (typically in JSON format) rather than a plain text response. The application then executes the tool, returns the result to the model, and the model generates a final response incorporating that information.

Tool calling is a foundational capability for building AI agents and assistants that can take real-world actions. Common examples include searching the web, querying databases, calling APIs, performing calculations, reading files, and executing code. Models from OpenAI, Anthropic, Google, and others support tool calling, making it a standard interface for extending LLM capabilities beyond their training data.

Last updated: February 25, 2026