Tools for AI agents

Hand-drawn row of five stepped terracotta inserts seated in matching sockets of a wall of small hatched cream, sand, umber and moss blocks.

Tools for AI agents are the commands, functions and interfaces an agent built on a large language model (LLM) uses to act: a shell, a file editor, an API. Their design changes how often the agent succeeds. In one controlled study, a purpose-built interface raised a coding agent’s success from 11.0% to 18.0% of tasks over a plain shell (Yang et al., 2024e).

Later studies dispute how general that gain is: predefined tools helped weaker models but added overhead for the strongest (Fan et al., 2026c). Other open questions are how much better tool descriptions help, how many tools an agent can choose among, and whether instruction files such as AGENTS.md raise success. Tool descriptions are also a route for attacks, and security guidance answers by enforcing limits outside the model, at some cost in task success (OWASP GenAI Security Project, 2024; Debenedetti et al., 2025). The design vocabulary of affordances (what a thing lets an agent do) and signifiers (the cues that reveal it) is covered in Interface design.

Purpose-built interfaces and the plain shell

What a purpose-built interface added Weak evidence: few or small studies support this

A purpose-built interface raised a coding agent’s success substantially in the SWE-agent study. The SWE-agent study defines an agent-computer interface (ACI) as the interface an LLM agent uses to interact with a computer. Its authors argue that LLM agents are a new kind of end user, the motivation for designing interfaces for them (Yang et al., 2024e).

With the same model (GPT-4 Turbo), the custom interface resolved 18.0% of SWE-bench Lite tasks against 11.0% for a shell-only agent, a 64% relative increase (Yang et al., 2024e). SWE-bench is a benchmark in which an agent must fix reported issues in real software repositories.

The gain came from several small design choices. An edit command that rejected edits failing a syntax check scored 18.0%, the same command without the check 15.0%, and no edit command 10.3%. A file viewer showing 100 lines at a time beat one showing 30 lines (14.3%) or the whole file (12.7%) (Yang et al., 2024e). The authors draw the principle that guardrails such as a syntax checker help agents recover from errors (Yang et al., 2024e).

Strong models and the plain shell Contested: studies disagree on this

Studies disagree on whether purpose-built tools still help the strongest models; one controlled study finds that the benefit depends on how capable the model is. On SWE-bench Verified, removing a predefined tool set cut a 30-billion-parameter model’s success from 25.2% to 10.2%. For the largest model, success rose from 65.8% to 69.4%, and cost per task fell from 2.33 to 1.11 dollars. The authors conclude that predefined tools scaffold weaker models and add overhead for stronger ones (Fan et al., 2026c).

Other comparisons with current models find no gain from extra tools. In enterprise tasks with Opus-4.8 and GPT-5.5, adding typed tools to Bash changed success by -0.6 and -0.2 percentage points. Both confidence intervals spanned zero, and Bash alone beat typed tools alone (Mak et al., 2026). Restricting two coding agents to a single code-execution tool left pass rates statistically tied and was cheaper or tied on cost in three of four settings (Yang et al., 2026i).

Minimal shell agents now score high. A roughly 100-line agent with only a bash tool, by the SWE-agent authors, reports over 74% on SWE-bench Verified (SWE-agent team, n.d.b). An agent that starts from bash and writes its own tools while it works reports 77.4% (Xia et al., 2025). The official bash-only leaderboard runs such a minimal agent, and Claude Opus 4.5 tops it (Willison, 2026b). These results come from different benchmarks and models than the SWE-agent study, so they are not a head-to-head test.

For web agents, the quality of the tools mattered as well as the strength of the model. Tools synthesized by another model helped mainly when the agent using them was weaker than the model that wrote them. GPT-5 did worse with them, from 39.2 to 37.4 on the WebArena benchmark of web tasks. Human-built API tools helped consistently, raising GPT-5 from 36.5 to 49.9 (Lou et al., 2026). A very large tool library also made agents take more steps (Lou et al., 2026).

Interface or scaffolding Weak evidence: few or small studies support this

Comparisons of two interfaces are hard to isolate from the program that runs the agent, its scaffolding. Exposing the same operations through the Model Context Protocol (MCP) or a command-line interface changed performance and cost substantially. Paired runs diverged in 94.3% of 2,004 episodes (Shi et al., 2026c). In another comparison of the two interfaces, scaffolding explained more of the cost than the interface did. Agents also often ignored the interface they were assigned (Alier Forment et al., 2026).

How such programs are built is covered in Harness engineering.

Structured paths and the browser

Studies disagree on whether structured access to a website beats letting an agent drive its pages; the answer depends on whether the structured path covers the task. On the WebMall shopping benchmark, agents using retrieval, MCP or NLWeb interfaces completed 11 percentage points more tasks than agents browsing HTML. They used two to five times fewer tokens on search tasks (Steiner et al., 2026). In the WindTunnel benchmark, the best page-driving setup solved as many tasks as a site’s native agent tools (WebMCP). It took 23 times the median cost and 4.3 times the median time (Levin & Karmi, 2026).

A structured path that stops short of the goal loses to the browser. In an early version of WindTunnel, the store’s agent tools stopped before checkout, so no tool-based setup could complete a guest checkout, while page-driving agents could (nekuda-ai, 2026). On the ERPNext business application, Opus 4.6 succeeded in 81.6% of tasks through the browser and 76.8% through the terminal, at about nine times the cost (Bechard et al., 2026). Agents limited to narrow tools fell behind even on tasks every approach could do. The authors blame limits on which fields the tools could set and which queries they could express (Bechard et al., 2026).

Tool names, descriptions and parameter schemas Strong evidence: many studies agree on this

Models choose tools from their metadata, so what a tool says about itself changes whether it is picked. Across five LLMs, descriptions that explain parameters tended to raise selection, names mattered less, and changes to the parameter schema shifted selection most (Li et al., 2026t). A parameter schema is the formal list of a tool’s inputs and their types. In another controlled study, good descriptions of what a tool does and how accurate it is raised selection by 11.6% and 8.8% (Wang et al., 2026k). Some edits to a description made two models use a tool more than ten times as often as with its original description (Faghih et al., 2025).

Most published tool descriptions have flaws. Of 856 tools on 103 MCP servers, 97.1% had at least one description “smell”, a recognised defect in how the description is written (Hasan et al., 2026b).

Fixing descriptions raises task success modestly, at a cost, and not everywhere. Augmenting every part of the descriptions raised success by a median 5.85 percentage points but increased the number of steps by 67.46%. No combination of improvements helped across all domains and models (Hasan et al., 2026b).

A change to a description can raise or lower success. Adding or removing one field of tool documentation changed task success by 6.34 percentage points on average. The same field could have opposite effects under different agent settings (Lu et al., 2026b). Repairing documentation gave no pooled gain on a benchmark where 62% of held-out queries already succeeded with the shipped descriptions (Huang, 2026b).

Wrong or missing information hurts more than a missing tool. Making a tool description incorrect cut task success roughly four times as much as adding or removing a tool (Xu et al., 2026c). With anonymized function names and no parameter information, OpenAI agents at first scored zero, calling tools without their arguments (Hallinan et al., 2026).

The size of this gain rests on one preprint, and shorter descriptions do not always cost accuracy. In a small pre-registered test, cutting one tool’s description from 1,856 to 465 characters caused no detectable accuracy loss. The author notes the test cannot rule out small effects (Clouatre, 2026).

Rewriting descriptions automatically can match hand tuning. A trained rewriter raised query-level success by 60.89% on one tool-use benchmark (Guo et al., 2026f). In skill routing at Microsoft, a single automated rewrite captured most of the gain. It reached 79.2% F1, a score combining missed and wrong matches, against 79.4% for hand-tuned descriptions (Zhou et al., 2026b).

Practitioner guidance treats tools as a design problem of their own. Anthropic’s guide says tools should be designed for agents rather than as APIs for developers, because agents have different affordances from traditional software (Aizawa, 2025). The MCP specification warns that tool names can collide when an agent connects to several servers, and suggests prefixing them with a server identifier (Model Context Protocol, 2026d).

Tool outputs and errors Weak evidence: few or small studies support this

The format of the data an agent reads has shown little effect on accuracy in recent tests. In 9,649 experiments over 11 models and four formats, format had no significant effect on overall accuracy (McMillan, 2026b). Earlier, GPT-3.5 varied by up to 40% on a code translation task when the same context was given as plain text, Markdown, JSON or YAML. Larger models such as GPT-4 were more robust (He et al., 2024).

Length trades context cost against information. Anthropic reports that no single response format suits every tool, and in its example concise responses used about a third of the tokens of detailed ones. Detailed responses keep identifiers the agent may need for its next call (Aizawa, 2025).

Errors the agent can act on Contested: studies disagree on this

Agents miss failures that look like success, and studies disagree on how far the way an error is delivered helps them recover. Errors are meant to be read by the model: the MCP specification says tool execution errors should be returned to the model so it can correct itself (Model Context Protocol, 2026d).

Agents notice explicit errors far more often than plausible wrong results. In one benchmark, agents treated a failure as a problem in 91.3% of trials when the tool returned an explicit error, against 58.8% when it returned a plausible wrong value (Kraishan, 2026a).

Changing how errors reached the agent raised success on explicit errors in ToolMaze by 14.2 points for 7–8B models and 10.5 points for 32–70B models. It showed no measurable gain on a second benchmark scored by the final state (Woo et al., 2026). A separate ToolMaze control traced the gain to a list of recovery tools; changing the diagnostic detail or the timing made no detectable difference (Panthi & Abdelfattah, 2026).

Permission to stop helped beyond a warning. In one benchmark of silent faults, a short prompt permitting the answer “cannot be determined” cut wrong answers after a warning from 70.1% to 18.2%. On new fault types, the authors’ harness cut wrong answers from 61.1% to 24.5%, by abstaining rather than recovering (Dip et al., 2026).

Cutting long outputs Weak evidence: few or small studies support this

Cutting long tool results to save context can backfire. In one agent harness, fixed-length cuts turned every one of the 3,827 truncated results into broken JSON. In a controlled test, cutting results led to 43% more tool calls and twice the computation. The agent still found the right answer when it had another route to it (Sehgal et al., 2026).

Moving output out of the context can lower accuracy. With the same simulation held fixed, GPT-5.2 was 9.4 percentage points less accurate when it retrieved a report than when the report came inline. Naming the authoritative report raised accuracy by 6.3 to 7.9 points over plain retrieval for three GPT models (Zhang et al., 2026q).

Retries and side effects Weak evidence: few or small studies support this

Retrying a call that changes something can repeat the change unless the system recognises the repeat. The evidence for agents comes from a few experiments with injected faults. In one of them, blind retry cleared short failures but added little for lasting ones. It also repeated simulated bookings, payments and messages (Dip et al., 2026).

Systems can make a repeat harmless or a write testable. Amazon recommends a unique request identifier, supplied by the caller, in the API contract, so a retry of the same operation can be identified (Featonby, n.d.). A Kubernetes dry run returns the object a change would produce without storing the change (Kubernetes, 2026b).

Transactions cover the case retries cannot: a failure after the effect but before the reply. In the Atomix experiments, idempotent retries, repeats that have no further effect, handled duplicate delivery, and transactional settlement helped most in that case. With faults injected into 30% of calls in a retail task, the full transactional mode reached 57% clean success, against 0–7% for six baselines. Checkpoint replay tied at 53% (Mohammadi et al., 2026). Staging irreversible effects within a task reduced irreversible-effect failures without lowering completion of benign tasks in a prototype (Chen et al., 2026g).

How many tools an agent can choose among Weak evidence: few or small studies support this

Agents pick the right tool less often as more tools are offered, but the size of the drop depends on the model. In one benchmark, going from 10 to 100 tools cut hit rates by about 9 to 10 points for three models. Claude 3.5 Haiku, for example, fell from 97.8% to 88.6% (Laddha et al., 2025). In another, function-calling performance fell by 7.59% to 85.58% across datasets (excluding one model) as the tool catalogue grew from 8,000 to 120,000 tokens, while GPT-4o dropped only slightly (Kate et al., 2025). The position of the right tool in the catalogue also mattered more as the catalogue grew (Kate et al., 2025).

Thresholds for how many tools is too many are not settled. One published analysis found a model below 90% accuracy at 10 to 15 tools. Its authors withdrew it because its numbers could not be traced to production records (Rodrigues & Vas, 2026). A practitioner source quotes a claim that models fail at selection beyond 100 tools (Speakeasy, n.d.).

Practitioners disagree on what to do about it. Anthropic cautions against assuming more tools help and recommends consolidating them (Aizawa, 2025). An engineering team that scaled to tens of thousands of tools treats granularity as a trade-off rather than a rule (Enrich Labs, n.d.).

Retrieving a few relevant tools before the model chooses helps. Searching tool descriptions first raised selection accuracy from 13.62% to 43.13% and cut prompt tokens by over half (Gan & Sun, 2025). Another method reports accurate selection from nearly 3,000 candidates with 98% fewer tokens (Fei et al., 2025). Anthropic reports that its tool search raised Opus 4 from 49% to 74% and Opus 4.5 from 79.5% to 88.1% in internal evaluations (Wu et al., 2025d).

Context and instruction files Contested: studies disagree on this

Studies disagree on whether repository instruction files, such as AGENTS.md, make coding agents better. An evaluation across several agents found that these files do not generally raise task success and add over 20% to inference cost (Gloaguen et al., 2026). In a smaller study of 124 pull requests, AGENTS.md files went with 28.64% lower median runtime. Task completion was comparable (Lulla et al., 2026). AI coding agents covers both studies in the context of coding work.

Who writes the file matters. Files written by developers did better than files generated by an LLM, though their average gain of 2.4% over no file was not statistically significant (Gloaguen et al., 2026). Overviews of the repository did not help (Gloaguen et al., 2026). How such files relate to skills and other stored instructions is covered in Agent skills.

Later experiments found no reliable gain either, except from guidance tuned to the task. On 17 tasks from three repositories, the choice of context strategy did not measurably change correctness for Claude Code or Codex. The study could exclude effects larger than 10 to 15 percentage points (Khatri, 2026). Guidance refined on probe tasks raised one model’s mean resolve rate on SWE-bench Verified to 33.0%. A static knowledge base reached 28.3%, and no guidance 25.5% (Shepard & Albrecht, 2026).

Stale instructions can cost extra work. In one study, a stale test command cost Claude Sonnet 5.5 about two extra tool calls per run, a third more than the corrected command. Other stale instructions showed no detectable difference. Correcting the stale instructions stopped operations on obsolete paths, and removing them prevented most such operations (Mehtiyev et al., 2026).

Protocols that expose tools

Several protocols describe tools in a machine-readable way, so that an agent can discover them at run time. They differ in what they describe: tools for one model, HTTP APIs, or whole agents.

The Model Context Protocol (MCP) lets servers expose tools that a model can discover and call by itself. A client lists the tools with a tools/list request. Each tool has a name, a description, an input schema, an optional output schema and optional annotations (Model Context Protocol, 2026d).

OpenAPI describes HTTP APIs in a language-neutral way. Each operation carries a summary, a prose description and an identifier (OpenAPI Initiative, 2026). The Agent2Agent protocol (A2A) describes whole agents rather than tools. Each A2A server must publish an Agent Card, a JSON document giving its identity, skills, endpoint and authentication, at /.well-known/agent-card.json (A2A Protocol, n.d.). Interfaces that expose websites to agents are covered in Websites and AI agents.

Attacks through tool descriptions Weak evidence: few or small studies support this

A tool’s description can carry instructions an attacker wrote, an attack called tool poisoning. In one benchmark, poisoned tool descriptions made agents follow malicious instructions up to 72.8% of the time. Models refused less than 3% of the time (Wang et al., 2025f).

More capable models are often easier to attack. Both the tool-poisoning benchmark and AgentDojo, which injects instructions into the data tools return, found this. The authors of the first explain it by the better instruction-following of capable models (Wang et al., 2025f; Debenedetti et al., 2024). In AgentDojo, injected instructions succeeded against the best agents in under 25% of cases (Debenedetti et al., 2024).

In AgentDojo, a defence that filters which tools the agent may call cut attack success to 7.5%. A detector of injected text instead hurt the agent’s usefulness through false alarms (Debenedetti et al., 2024). The MCP specification requires clients to treat tool annotations as untrusted unless they come from trusted servers (Model Context Protocol, 2026d).

Trust boundaries around tools

Security guidance for tool-using agents assumes the model can be manipulated, so it places limits outside the model. A trust boundary is the point where data or requests pass from a less trusted part of a system to a more trusted one. The guidance comes mostly from practitioner bodies, and the tests of it from benchmark studies, many of them preprints.

Untrusted inputs and outputs

Anything a model produces is treated like input from an unknown user. The OWASP GenAI Security Project, a community that publishes security guidance, recommends treating the model as any other user and validating its responses before they reach backend functions (OWASP GenAI Security Project, n.d.b).

Authority enforced outside the model

The decision whether an action is allowed belongs to the system that carries it out, not to the model. The same project recommends implementing authorization in downstream systems rather than letting an LLM decide, and requiring human approval for high-risk actions (OWASP GenAI Security Project, 2024).

Permissions written by models were unreliable in one benchmark. In it of least privilege, granting only the access a task needs, models both omitted permissions the task required and granted unused or sensitive ones (Yan et al., 2026a). In another benchmark, asking the person the agent acted for before completing a task was associated with acting beyond authorization less often (Zhang et al., 2026a).

An architectural defence can cost task success. CaMeL, a defence against prompt injection, solved 77% of AgentDojo tasks with provable security, against 84% for the undefended system, across the models tested (Debenedetti et al., 2025). AgentDojo’s authors also report that the leading models they tested failed many tasks even with no attack (Debenedetti et al., 2024). TACIT, a defence based on tracked capabilities, reports task success in a range comparable to CaMeL’s. Its authors compared their own runs with CaMeL’s published figures (Odersky et al., 2026).

Trust between agents Weak evidence: few or small studies support this

Messages between agents can carry injected instructions, and keeping track of provenance, where each piece of data came from, can close this route. A protocol that extends CaMeL across agent boundaries had 0.0% attack success on a multi-agent benchmark, against 0.2% with CaMeL on each agent alone and 12.9% with no CaMeL (Peters-Gill et al., 2026). How agents exchange messages is covered in Coordination between AI agents.

Data sent to model providers

What an agent sends to a hosted model leaves the system, and guidance asks designers to find out what the provider does with it. AWS advises asking the provider how it processes and stores data, prompts and outputs, who has access to them, and for what purpose (Keating & Waymouth, 2024).

Limiting what the agent can see protects data that the task does not need. AirGapAgent restricts an agent’s access to the data relevant to its task. Its authors report that it protected up to 97% of contextually private data with a small loss of usefulness on their benchmark (Bagdasarian et al., 2024). The wider practice of collecting less personal data is covered in Privacy by design.

Spending limits

Cloud spending caps stop new work only after a delay. Google Cloud states that enforcement of its spend caps is not instant and that overages are billed as normal (Google Cloud, 2026e). Cloudflare rejects new invocations of its Workers once a spending limit takes effect, but blocking takes time after the threshold is crossed (Cloudflare, 2026c).

Further reading

  • (Yang et al., 2024e): the SWE-agent paper, which defined the agent-computer interface and measured each of its design choices.
  • (Fan et al., 2026c): a study of coding-agent harnesses showing predefined tools help weaker models and hinder the strongest.
  • (Hasan et al., 2026b): a survey of defects in MCP tool descriptions and of what fixing them gains and costs.
  • (Aizawa, 2025): Anthropic’s practitioner guide to designing tools for agents.
  • (Gloaguen et al., 2026): an evaluation of AGENTS.md-style context files for coding agents.
  • (Debenedetti et al., 2024): AgentDojo, a benchmark of prompt-injection attacks on tool-using agents and of defences against them.

Known gaps

What this article cannot tell you yet.

  1. No study compares a purpose-built interface and a plain shell across successive generations of the same model on one benchmark version, so whether the benefit shrinks as models improve rests on comparisons across model sizes and vendors.
  2. The original SWE-agent interface ablation has not been rerun with newer models.
  3. The median gain from augmented MCP tool descriptions has not been rerun on the same benchmark; later studies of description changes use other benchmarks and find effects in both directions.
  4. Controlled studies of error delivery do not separate the wording of error messages from stable error codes.
  5. Which output limits and pagination schemes work across tasks and models was not established.
  6. The effect of previews, undo and confirmation steps on agent workflows was not compared; the evidence on retries comes from selected tasks with injected faults.
  7. Whether repository guidance tuned for one model transfers to other models, task families and step budgets is open.
  8. Vendor dynamic tool loading (tool search) has no independent replication of its reported gains.
  9. The study linking AGENTS.md files to faster runs is known from its abstract, and works citing the main context-file evaluation were not traced.
  10. The task-success cost of CaMeL’s architectural defence has no independent replication; the comparison in the TACIT paper reuses CaMeL’s published figures.
  11. How often authorization outside the model, human approval or provenance tracking prevents harm from tool-using agents in production is unknown.
  12. How quickly provider spending limits stop billable model calls, and how much spending passes before they act, is unquantified.
  13. Most of the evidence comes from 2025 and 2026 preprints, many tested on one benchmark or a few models.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 67 references