Tool use & MCPs (Model Context Protocol)
Tool use (or "function calling") is how a model does things beyond just generating text - like searching the web, running code, or calling an API - by outputting a structured request ("call this tool with these inputs"), which the surrounding software then actually executes and feeds the result back in.
The model itself never directly "does" anything - it only ever outputs text/structured data. When it "uses a tool," it's really outputting something like a JSON block saying "call weather_api with city=Dubai," and the application code intercepts that, actually calls the real API, and returns the result to the model as new context for its next response. This is the exact mechanism behind every AI tool you've used in this very conversation. The Model Context Protocol (MCP), introduced by Anthropic, has become the popular open standard for wiring up these tool connections consistently across different apps and models.
Ask Claude "what's the weather in Dubai right now" - you're watching tool use happen live. Notice the model doesn't know this from training; it had to decide to call a tool, and that tool's real result got fed back in before the final answer.
When a model "uses a tool," what is it literally doing?