An AI model uses a tool by writing a request for it, not by running it. When a question needs a web search, a calculation, a browser or an app, the model produces a structured request naming the tool and its inputs. External software decides whether that request is valid and permitted, then carries it out [1, 2].
After the tool runs, its result is returned to the model as new context. The model may then answer the user, request another tool or stop. The tool is a connection between the model and an outside system: the search results, code output or app data come from that system, not from what the model learned in training. This separation between proposing an action and executing an action is essential for reliability and security.
The previous guide, What Does AI Remember Between Messages—and What Does It Forget? AI Memory, Context, and Retrieval, separated information a system saves from information that sits in the conversation. Tool results are another source of information that enters the conversation, and this guide follows how they get there.
TL;DR
- A model proposes a tool name and arguments; application software validates and executes them [1, 2].
- Tool results return as observations that can inform the next model response [1, 3].
- Search, calculators, code, browsers, apps and business systems give models access to capabilities outside their weights [1, 3].
- A tool result is information supplied for one request, not knowledge the model has absorbed.
- Tool output may be wrong, malicious or misunderstood.
- Permissions should be narrow, arguments validated and important actions approved by a person [2, 4, 5].
- A fluent request is not authorization.
The Request-to-Result Flow
A typical tool interaction has five stages:
- Request. The user asks for something that may require an external capability.
- Propose. The model selects a tool and generates structured arguments.
- Validate and authorize. Application code checks the tool, inputs, user permissions and policy.
- Execute. External software runs the approved operation.
- Observe and continue. The result returns to the model, which uses it to respond or choose another step [1, 3, 2].
For a weather question, the model might propose a call containing a location and date. The application verifies those fields, sends the request to a weather service and returns the response. The model then turns the structured result into a readable answer.
The model did not independently access the service. It produced a candidate request within a system whose developers set the available tools and permissions.
What Is Function Calling?
Function calling is a common way to connect a model to software. The application describes available tools, including their names, purposes and expected input fields. When the model decides a tool is useful, it returns a structured request rather than pretending to know the result.
A simplified request might look like this:
“text tool: get_order_status arguments: order_id: 84721 “
That output is still untrusted input. The application should check that the order identifier is valid and that the current user is allowed to view it. Only then should the function run.
What Tools Can Add
Different tools compensate for different model limits:
- Search can retrieve current or specialized information.
- Calculators can perform exact arithmetic.
- Code environments can transform data, test logic or create files.
- Browsers can navigate interfaces and collect information from pages.
- Databases can retrieve or update structured records.
- Apps and business APIs can create tickets, send approved messages or schedule events. An API, or application programming interface, is the structured way one piece of software accepts requests from another.
Research systems have shown models using calculators, search engines, translation systems and other APIs, as well as interleaving reasoning with actions [1, 3]. The practical value comes from connecting generation to a controlled capability.
Tool Results Are Not Model Knowledge
When an assistant answers with today’s search results or the output of a calculation, it can look as though the model knew the answer. It did not. The application placed the tool’s result into the model’s input for that request, inside the context window, and the model generated a response from it [1, 3].
That has three consequences:
- The answer is only as good as the result. A model can accurately summarize a search result that is itself wrong or outdated.
- Nothing is learned permanently. Using a tool does not update the model’s parameters. Unless the system saves the result or runs the tool again, a later conversation will not contain it.
- Missing tools mean missing information. If a system has no search tool, the model can only draw on its training and whatever is already in the conversation.
This is the same principle as retrieval-augmented generation, where retrieved documents are added to the prompt. Search is one kind of retrieval; tools extend the idea to calculations, code and actions in other software.
One Tool Call or Many
A single tool call is often enough: look up an order, then answer. In a fixed workflow, developers decide the sequence of steps in advance and the model handles one part.
In an agent loop, the model has more say over which tool comes next. It observes a result, requests another step and repeats until a stopping condition is reached [3, 2]. More autonomy can help with open-ended tasks, but it also increases the number of places an error can spread. How agents plan, loop and act with greater independence is the subject of BuildAIQ’s AI Agents + Autonomy chapter; this guide stays with the single connection between a model and a tool.
Why Tool Use Creates New Risks
Text generation errors are no longer confined to text when a model can act on external systems.
Invalid arguments
The model may invent an account number, omit a required field or select the wrong tool. Schema validation catches formatting errors but not every plausible-looking mistake.
Prompt injection
Search results, web pages, files or tool outputs can contain text that tries to manipulate the model. The model may mistake untrusted content for instructions.
Excessive permissions
A read-only research task should not have credentials that can delete records. OWASP identifies excessive agency as a risk because unexpected or manipulated outputs can trigger damaging actions [4].
Side effects and repetition
Retries are harmless for a weather lookup but dangerous for sending payments or messages. Applications need safeguards against duplicate and irreversible actions.
Misleading observations
A tool may return incomplete, stale or malicious data. The model can confidently summarize a bad result.
A Safer Tool-Use Checklist
- Allow only the tools required for the task.
- Use separate read and write permissions.
- Validate arguments outside the model.
- Enforce user and data access rules at execution time.
- Treat web pages, documents and tool outputs as untrusted content.
- Require confirmation for financial, legal, external-facing or irreversible actions.
- Show users what will happen before it happens.
- Log the request, authorization, execution and result.
- Set limits on steps, cost, time and retries.
- Provide a way to stop, reverse or escalate the process.
Human checkpoints are especially important when the system reaches a blocker or is about to perform a high-impact action [2, 4, 5]. The model should not be the sole judge of whether its own proposed action is safe.
Societal Impact Lens: Who Is Accountable for an AI Action?
Saying “the AI did it” hides the people and systems that made the action possible. Developers choose the tools, organizations grant credentials, product teams design approval steps and users provide requests.
Accountability requires records that show what the model proposed, what the application permitted and what the external system actually did. People affected by automated actions also need a path to question or correct them.
The more consequential the action, the less acceptable it is to rely on a model’s apparent confidence or intent.
Bringing the Pieces Together
Tools complete the set of parts this chapter has described: a trained model, the context it receives, information retrieved for it, what a system remembers and the external software it can call. Each part has its own limits. The final guide, How Do AI Models, Knowledge, Memory, and Tools Work Together?, shows how they combine in one system.
Practical Takeaways
- Separate model output from authorized execution.
- Treat tool results as information supplied for one request, not as something the model knows.
- Treat every generated tool call as untrusted until validated.
- Grant the narrowest permissions that can complete the task.
- Put human approval before consequential or irreversible actions.
- Audit the full action chain, not only the final response.
Sources
- Toolformer: Language Models Can Teach Themselves to Use Tools. arXiv, 2023-02-09, accessed 2026-11-08.
- Building effective agents. Anthropic, 2024-12-19, accessed 2026-11-08.
- ReAct: Synergizing Reasoning and Acting in Language Models. arXiv, 2022-10-06, accessed 2026-11-08.
- OWASP Top 10 for Large Language Model Applications. OWASP Foundation, 2025-01-01, accessed 2026-11-08.
- Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile. NIST, 2024-07-26, accessed 2026-11-08.
