AI agents use tools by asking for them. A tool is a specific job the agent’s software makes available, such as a web search, a page reader, a code runner, an email sender or a file editor. When an agent “searches the web” or “sends an email,” the language model behind it does not reach out and do it. It writes a request naming the tool and what to use it on, and the connected system decides whether to run that request, runs it and hands back the result. Searching, browsing, coding, sending and editing all work this way; what differs is what each tool can reach and change.
Under the hood, that request is a structured message naming a tool and its inputs; the model never runs the tool itself, and the surrounding software carries it out [1, 2, 3]. What an agent can actually do is therefore set by which tools it is given and what each tool is permitted to reach. The previous guide showed how an agent breaks a goal into smaller tasks; tools are how each of those steps turns into an action. For the bigger picture of what agents are, start with what an AI agent is.
TL;DR
- A tool is a described function. Each has a name, a plain-language description and a list of the inputs it needs, and the model picks tools from those descriptions [1, 3, 4].
- The model requests; the application executes. A tool call is a structured request, and software (the developer’s code or the provider’s servers) runs it [2, 3].
- Every result goes back to the model as new input. That result can be useful data, an error message or text that tries to steer the agent [3, 5, 6].
- Different tools reach different things. Search and page-reading tools retrieve information; sending, editing and updating tools change things outside the conversation [2, 7].
- The main controls are concrete design choices: the narrowest permissions that will do the job, confirmation before consequential actions, logs, and a way to undo mistakes [8, 6, 9].
What Counts as a Tool for an AI Agent?
A tool is any piece of functionality an application tells the model it may request: checking the weather, looking up an account, issuing a refund or anything else a developer connects [3]. Some tools only fetch information. OpenAI’s guide to building agents calls these data tools, with examples such as querying a database, reading a PDF or searching the web [7]. Others change something. OpenAI’s action tools add or update records and send messages, including emails and texts [7].
That second group is why tools matter so much. Anthropic notes that a model can describe sending an email, writing a file or updating a record, but only a tool can actually do it [2].
Tools also differ in where they run. Some run inside the developer’s own application. Others run on the AI provider’s servers; Anthropic, for example, runs its web search, web fetch and code execution tools itself [2]. A common way to plug in outside tools is the Model Context Protocol (MCP), an open-source standard for connecting AI applications to external systems [10].
Having a tool does not by itself turn a chatbot into an agent. That line is drawn in how agents differ from chatbots, assistants and workflows.
How a Tool Is Described to the Model
Tool use is not unique to agents: chat assistants also search and run code. The general mechanics, including function calling, are explained in how AI uses search, code, browsers, apps and other tools; this guide focuses on what matters when an agent chains tool calls on its own. The model learns what a tool does from a short definition the developer writes. In OpenAI’s format, a definition has a name, a description of when and how to use the tool, and a schema: a structured list of the inputs the tool accepts and what type each one is [3]. MCP tool definitions follow the same pattern, with a unique name, a human-readable description and an input schema [4].
OpenAI’s documentation uses a weather tool along these lines [3]:
| Part of the definition | Example |
|---|---|
| Name | get_weather |
| Description | Retrieves current weather for the given location |
| Inputs | location (text); units (celsius or fahrenheit) |
The model never sees the code behind the tool, only this definition and whatever result comes back [2]. Anthropic says its model chooses when to call a tool from the user’s request and the tool’s description [1]. That puts real weight on the wording. OpenAI suggests an “intern test”: could a person use the function correctly given nothing but what the model was given [3]?
Format rules help, but they do not guarantee good choices. OpenAI’s strict mode makes a model’s tool calls reliably match the declared schema [3]. That ensures the request is well formed, not that the values inside it are right. Asked “What’s the weather?” with no place named, a model may simply guess a city, Anthropic’s documentation notes [1]. Anthropic’s engineers also list the mistakes agents make with tools: choosing the wrong one, passing the wrong inputs, calling too few, or misreading what comes back [11].
Asking Versus Doing: Who Actually Takes the Action
Anthropic’s documentation is blunt: the model never runs anything on its own [2]. OpenAI describes the exchange in five steps, which come down to four moves [3]:
- The application sends the model the user’s request plus the list of available tools [3].
- The model replies with a tool call: the tool’s name and the inputs it wants to use [3].
- The application’s own code runs the tool with those inputs [3].
- The application sends back the result, and the model either answers or requests another tool [3].
The gap between the second and third moves is where control lives. Because software performs the action, software can check it first. In Anthropic’s Claude Code coding agent, permission rules are enforced by the application rather than the model: instructions shape what the model tries to do, but they do not change what the software allows [12]. The OWASP Gen AI Security Project, a community security effort, makes the general point that authorization belongs in the systems a tool touches, not in the model’s judgment of whether an action is allowed [8].
A single tool call is one pass through a larger cycle. How agents chain calls, track progress and come to a stop is covered in the agent loop.
What Comes Back After a Tool Runs
The result, sometimes called an observation, is handed to the model as new input. It can be structured data or plain text, and it is tied to the specific tool call that produced it [3]. When a tool fails, the error should come back too: the MCP specification says clients should pass tool execution errors to the model so it can correct itself [4]. Anthropic recommends that tools return only high-signal information, and reports that replacing cryptic identifiers with meaningful names improved its model’s precision on retrieval tasks [11].
Results deserve less trust than they often get. Anthropic notes that its model sometimes acts as if an action succeeded without checking the result [6]. Results can also carry instructions. Anthropic warns that, in some circumstances, its model follows commands found in content such as webpages even when they conflict with the user’s instructions [6]. OWASP calls this indirect prompt injection: content from websites or files that changes a model’s behavior in unintended ways [5]. How that manipulation works is explained in how websites and data can manipulate an AI agent, and tool misuse generally in how AI agents can fail when they take action.
Six Kinds of Action, and What Each Can Reach
The six verbs in this article’s title cover very different levels of reach. The product details below are examples of each mechanism as their makers documented them when this guide was researched, not recommendations, and they change often.
Search
Search is the most familiar tool. With Anthropic’s web search tool, the model chooses when to search, the provider runs the searches and returns the results, the process can repeat within one request, and the final answer cites its sources [13]. Developers can cap the number of searches per turn and restrict which domains are used [13]. The idea predates products: the ReAct researchers gave a model a simple Wikipedia interface with three actions, to search for a topic, look up a phrase on the current page and finish with an answer [14]. Search only reads, but whatever it reads becomes the agent’s next input.
Browse and Operate a Screen
Browsing ranges from fetching one page’s text to operating a whole computer. Anthropic warns that its page-fetching tool creates a risk of data exfiltration, meaning information being leaked out, when the model handles untrusted input alongside sensitive data [15]. To limit that risk, the tool can only fetch addresses that already appeared in the conversation, not ones the model wrote itself [15].
Computer use goes further. The model receives screenshots and requests clicks and typing, which the developer’s software performs in an environment it controls [6]. OpenAI suggests this approach for older systems that offer no programming interface [7]. Anthropic lists its limits plainly, including slowness, mistakes and unexpected actions [6]. It recommends a dedicated virtual machine with minimal privileges, no access to sensitive data such as logins, and an allowlist of websites [6]. Screen-based operation gets its own guide later in this block: how an AI agent can use a computer.
Run Code
Code tools let an agent calculate, analyze data or produce files, and where the code runs matters most. Anthropic’s code execution tool runs in a sandboxed container, an isolated environment, with no internet access [16]. OWASP advises avoiding open-ended tools such as “run any shell command” where possible, in favor of tools that do one specific job [8].
Send Messages
OpenAI lists sending emails and texts among its action tools [7]. A message reaches other people, so the permission behind the tool matters. OWASP’s example is an assistant that summarizes email: it needs to read messages, not to send or delete them [8]. Google’s Gmail permissions show how finely those lines can be drawn. One permission scope only views messages and settings, another only sends email on the user’s behalf, and the broadest can read, compose, send and permanently delete all email [17]. Google advises developers to choose the narrowest scope possible [17].
Edit Files
File tools let an agent read, create and change documents or code. Anthropic’s text editor tool, for instance, can view a file, replace an exact passage, create a file or insert text at a given line [18]. Anthropic advises developers to validate file paths, check permissions and back up files before allowing edits [18]. Some products add an undo. Claude Code automatically tracks the agent’s file edits so a user can rewind [19]. That undo is partial: files changed only by shell commands, and changes made outside the session, are not tracked, and the documentation says checkpoints are not a replacement for version control [19].
Change Other Systems
The widest category covers anything that updates a record or changes an account in another service. OpenAI’s examples of high-risk actions include canceling orders, authorizing large refunds and making payments, which it says should trigger human oversight until confidence in the agent’s reliability grows [7]. Anthropic recommends that a person confirm computer-use decisions with meaningful real-world consequences, such as completing financial transactions or agreeing to terms of service [6]. Because the model can bundle several actions into one turn, any such check has to happen before each action runs [6].
Matching Tool Power to Risk
Safety for agent tools comes mostly from ordinary system design, applied consistently. The controls below are the tool-level view; deciding what an agent should be allowed to reach overall is covered in what an AI agent should be allowed to access and do. Joint guidance from six national cyber-security agencies, published in May 2026, says strict least privilege is critical because the privileges given to an agent directly determine the risk it can introduce [9]. It is general guidance, not regulation [9].
Grant the least that will work. OWASP traces excessive agency, a system’s capacity to do damage when the model’s output goes wrong, to too many functions, too many permissions or too much autonomy [8]. It recommends that tools acting for a user run with that user’s own access and the minimum permission scope required [8].
Make risky calls ask first. As documented in November 2026, Claude Code reads files in its working folders without approval but asks before shell commands, file edits and web requests, with some built-in exceptions [12]. Its mode that skips these prompts is meant only for isolated environments such as containers or virtual machines [12].
Don’t mistake a prompt for a wall. OpenAI’s Agents SDK documentation notes that its approval feature does not provide a sandbox; developers must still enforce where commands run and what they can change [20]. MCP lets tools label themselves read-only or destructive, but the specification calls those labels hints and says they should not drive decisions when they come from untrusted servers [21].
Keep a record. The MCP specification says clients should log tool usage for audit, and the agency guidance asks for tool use and results to be logged in human-readable form [4, 9]. OWASP notes that logging and rate limits do not prevent damage but can limit it [8].
Plan for undo. OpenAI suggests rating each tool low, medium or high risk by whether it can write, whether its effects can be reversed, what account permissions it needs and its financial impact [7]. The agency guidance recommends classifying actions by impact and reversibility, building rollback to a known-good state, and preventing agents from changing their own privileges [9].
Deciding when to ask is itself a design choice; the agency guidance says system designers or operators, not the agent, should set when human approval is required [9]. The same holds for responsibility: when a tool sends a message or changes a record, the people and organizations that connected the tool, granted its permissions and deployed the agent answer for the result, not the model. How to design those pauses is the subject of when an AI agent should stop and ask a human.
What We Know, What We Don’t, and Where Experts Disagree
What We Know
- The split between a model requesting a tool and software executing it is documented consistently by Anthropic, OpenAI and the MCP specification [2, 3, 4].
- Security guidance converges on the same core controls: least privilege, approval for high-impact actions and logging [8, 9].
What We Don’t Know
- How often agents pick the wrong tool, pass wrong inputs or misread results in real use. The statements found for this article are vendor observations without rates [11].
- How well product-level undo and approval features hold up; the documentation itself lists what they do not cover [19, 20].
What Experts Disagree About
Confidence: Expert Debate
The main design debate is narrow tools versus general ones. OWASP advises against open-ended tools such as a shell or a fetch-any-address tool, preferring single-purpose functions [8]. Anthropic publishes general shell, file-editing and computer-control tools, saying its model calls these familiar formats more reliably, and pairs them with sandboxing and minimal privileges [2, 6].
Where This Leads: From Tools to App Connections
Many tools work by calling another program: a search tool may call a search service, and a message tool may call an email system. The next guide, how AI agents connect to other apps, explains APIs, the structured connections that let one piece of software ask another to do something, and why they matter so much to agents.
Practical Takeaways
- List what each tool can reach. Before connecting an agent to accounts or files, find out which tools it has and whether each can only read or can also change things [8].
- Ask for the narrowest permission. Reading email and sending it can be separate permissions; an agent that only summarizes should not hold both [8, 17].
- Look for a pause before consequential actions. Payments, agreements and refunds are where confirmation belongs [7, 6].
- Check that the prompt is backed by a boundary. An approval button is not isolation, so ask where the agent’s actions actually run [16, 20].
- Make sure there is a record. Logs of each tool call and its result show what happened and when [4, 9].
- Know what can be undone. File checkpoints may not cover every change, and actions in other systems need their own rollback plan [19, 9].
Sources
- Tool use with Claude. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- How tool use works. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- Function calling. OpenAI (API documentation), accessed 2026-11-08.
- Tools. Model Context Protocol, 2026-07-28, accessed 2026-11-08.
- LLM01:2025 Prompt Injection. OWASP Gen AI Security Project, 2024-04-10, accessed 2026-11-08.
- Computer use tool. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- A practical guide to building agents. OpenAI, accessed 2026-11-08.
- LLM06:2025 Excessive Agency. OWASP Gen AI Security Project, 2024-04-10, accessed 2026-11-08.
- Careful adoption of agentic AI services. Australian Signals Directorate's Australian Cyber Security Centre (ASD's ACSC), CISA, NSA, Canadian Centre for Cyber Security, NCSC-NZ and NCSC-UK (joint guidance), 2026-05-01, accessed 2026-11-08.
- What is the Model Context Protocol (MCP)?. Model Context Protocol, accessed 2026-11-08.
- Writing effective tools for agents — with agents. Anthropic (Engineering), 2025-09-11, accessed 2026-11-08.
- Configure permissions. Anthropic (Claude Code Docs), accessed 2026-11-08.
- Web search tool. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- ReAct: Synergizing Reasoning and Acting in Language Models. arXiv, 2022-10-06, accessed 2026-11-08.
- Web fetch tool. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- Code execution tool. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- Choose Gmail API scopes. Google for Developers, 2026-09-10, accessed 2026-11-08.
- Text editor tool. Anthropic (Claude Platform Docs), accessed 2026-11-08.
- Checkpointing. Anthropic (Claude Code Docs), accessed 2026-11-08.
- Tools – OpenAI Agents SDK. OpenAI (Agents SDK documentation), accessed 2026-11-08.
- Schema Reference. Model Context Protocol, 2026-07-28, accessed 2026-11-08.
