The mechanism by which LLMs invoke external functions, APIs, or services to perform actions beyond text generation.
Tool-calling (also called function calling) is the mechanism by which a large language model can invoke external capabilities—APIs, databases, file systems, code interpreters, or any other defined interface—as part of completing a task.
When a model with tool-calling capability encounters a task that requires external action, it outputs a structured tool invocation request (specifying the tool name and parameters) rather than attempting to produce the result from its training data. A calling layer executes the tool and returns the result to the model, which incorporates it into its continued reasoning.
Tool-calling transforms LLMs from static knowledge bases into dynamic agents capable of:
- Real-time data access: Current prices, live inventory, live user data
- Write operations: Sending emails, creating records, updating databases
- Computation: Running code, performing calculations, generating media
- Cross-system integration: Orchestrating actions across multiple APIs in sequence
The quality of an agentic system's tool-calling implementation—the breadth of available tools, the reliability of tool schemas, and the robustness of error handling—is often the primary determinant of real-world task completion rates.