tool use
Tool use, also called function calling or tool calling, is the capability of a language model to invoke external functions or services during generation and to integrate their outputs into its ongoing reasoning and responses.
In practice, applications expose tools through structured interfaces, and the model answers with a structured call naming the tool and its arguments. Client-side tools run in the calling application, which executes the operation and sends the result back to the model. Server-side tools run on the provider’s own infrastructure, so the results usually come back in the same response without the application handling execution. Either way, the model receives the output and decides what to do next. Some providers also support programmatic tool calling, where the model writes code that drives the tools inside a sandboxed code execution environment instead of making a separate round trip per call. That cuts latency and keeps large intermediate results out of the model’s context.
Common tools include retrieval or web search, page fetching, code execution environments, shell commands and file editing, desktop and browser control, persistent memory, and domain-specific APIs. These extend a model beyond its fixed training data and allow it to query live information or perform real actions in the outside world. Applications increasingly advertise these tools through the Model Context Protocol (MCP), a vendor-neutral standard that lets a model discover and call tools from an external server instead of requiring a hand-wired integration per provider.
Research on tool use has produced prompting and training strategies that interleave reasoning with actions, route requests to specialized components, and help models learn when and how to issue API calls. This capability underpins patterns like retrieval-augmented generation (RAG) where retrieval is treated as a tool.
Related Resources
Tutorial
Python MCP Server: Connect LLMs to Your Data
Learn how to build a Model Context Protocol (MCP) server in Python. Connect tools, prompts, and data to AI agents like Cursor for smarter assistants.
For additional information on related topics, take a look at the following resources:
By Leodanis Pozo Ramos • Updated Sept. 21, 2026