Tool calling
Tool calling is a model capability in which the model outputs a structured request: a tool name plus JSON arguments. The application runs the tool and returns the result to the model, which uses it to continue. The capability is also called function calling. The model never executes the tool itself.
How tool calling works
You define each tool with a name, a description and a JSON Schema for its arguments. The model sees these definitions. When a task needs a tool, the model returns a tool-use request that names the tool and gives arguments that match its schema. The application then does the work in four steps:
| Step | Who does it |
|---|---|
| Pick a tool and write its arguments | Model |
| Run the tool | Application |
| Send the output back as a tool result | Application |
| Write the answer, or request another tool | Model |
One conversation can chain several calls. The model chooses the order, and the application controls what actually runs.
Why it matters for AI agents
Tool calling is how a language model affects anything outside the chat. Searches, reads and writes all pass through it. Tool descriptions and schemas guide correct use, and vague descriptions lead to wrong arguments.
Wield and tool calling
An agent that uses Wield calls the wield-mcp tools. A typical conversation uses two calls: find_recipe to find a task on a site, then run to execute it with parameters. The recipe runs in your browser with no model in the loop, so a run uses no LLM tokens. The model still handles the tool calls, so the conversation itself uses tokens. Wield marks results as website content, and the agent should treat that content as data, not as instructions. See the tool reference.
Related terms
- MCP server: a common way to offer tools to a model.
- AI agent: a system that calls tools in a loop until a goal is met.
- Browser agent: an agent that calls browser actions as its tools.
FAQ
Is tool calling the same as function calling?
Yes. Function calling is another name for the same capability. In both cases the model outputs a structured request with arguments, and the application runs it.
Does the model execute the tool itself?
No. The model only writes the request. The application runs the tool, which can be a local function, an MCP server call or an API call, and returns the result to the model.
Sources
- Anthropic tool usedocs.anthropic.com
- MCP tools specificationmodelcontextprotocol.io