ποΈ 21032026 2100
The mechanism by which LLMs generate structured function calls that a runtime executes, bridging language understanding with real-world actions
What Is Tool Use?β
Tool use (also called "function calling") allows an LLM to request the execution of external functions instead of generating a text-only response. The LLM doesn't execute anything itself β it produces a structured call that the runtime environment handles.
Request / Response Cycleβ
User Runtime LLM
β β β
β "What's the β β
β weather in β β
β Tokyo?" β β
β ββββββββββββββββ>β β
β β messages + β
β β tool_definitionsβ
β β ββββββββββββββββ>β
β β β
β β tool_use: β
β β get_weather β
β β {"city":"Tokyo"}β
β β <βββββββββββββββββ
β β β
β β [executes fn] β
β β β
β β tool_result: β
β β "22Β°C, sunny" β
β β ββββββββββββββββ>β
β β β
β β "It's 22Β°C and β
β β sunny in Tokyo"β
β β <βββββββββββββββββ
β "It's 22Β°C and β β
β sunny in Tokyo"β β
β <βββββββββββββββββ β
- User sends a request to the runtime
- Runtime forwards the message along with available tool definitions to the LLM
- LLM decides to use a tool and returns a structured
tool_useblock - Runtime executes the function and sends the result back as a
tool_result - LLM incorporates the result into its final response
Tool Definitionsβ
Tools are defined via JSON Schema, telling the LLM what's available and how to call it:
| Field | Purpose |
|---|---|
name | Function identifier (e.g., get_weather) |
description | When and why to use this tool β critical for the LLM's decision-making |
input_schema | JSON Schema specifying parameter names, types, and constraints |
Good descriptions matter: the LLM uses the description to decide when to call a tool. Vague descriptions lead to incorrect or missed tool calls.
How Tool Use Enables Agentic Patternsβ
Tool use is the foundational capability that makes agentic patterns possible:
| Pattern | How Tools Are Used |
|---|---|
| Single agent | Agent calls tools sequentially to accomplish a task |
| coordinator_router_pattern | Coordinator uses tools to delegate to specialist sub-agents |
| agent_as_tool_pattern | Sub-agents are themselves exposed as callable tools |
| loop_review_critique_pattern | Reviewer agent uses tools to validate outputs against criteria |
Tool Use vs MCPβ
| Aspect | Tool Use | MCP |
|---|---|---|
| What it is | LLM-side capability to call functions | Infrastructure protocol for exposing tools |
| Scope | Single LLM β runtime interaction | Ecosystem-wide tool discovery and access |
| Defined by | Each LLM provider (Anthropic, OpenAI, Google) | Open standard (MCP spec) |
| Relationship | The mechanism | The plumbing that delivers tools to the mechanism |
Think of tool use as the LLM's ability to "use its hands", and model_context_protocol as the standard that puts tools within reach.