How do tools work in an n8n AI agent, and how do you keep them safe?
In n8n, tools are the actions an AI Agent node is allowed to take: app nodes such as Google Sheets or Gmail, an HTTP Request tool for calling APIs, a Code tool, another n8n workflow, or an MCP server. You attach them to the agent as sub-nodes, the chat model decides which one to call for each request, and n8n runs it and hands the result back. Keep each tool narrow and put human approval on anything that writes or sends.
Key takeaways
- n8n describes tools as "interfaces that an agent can use to interact with the world".
- The Tools Agent supports over 100 tools, including Call n8n Workflow, Code, HTTP Request, Calculator, Vector Store, Wikipedia, SerpApi and many app nodes.
- Max Iterations defaults to 10, which limits how many times the model runs while working towards an answer.
- App node parameters can be filled by the model at run time with the $fromAI() function.
- n8n lets you add human review to tool connections, so the workflow pauses for approval before a gated tool runs.
What a tool is in n8n
n8n's documentation page How tools work describes tools as "addons that your AI can use" to reach extra context or resources, and as "interfaces that an agent can use to interact with the world." They come from three places: built-in nodes for services such as Wikipedia and SerpApi, MCP servers from n8n's registry, and sub-nodes that attach to the agent's root node.
It singles out three general-purpose tools:
- Call n8n Workflow Tool: runs any of your n8n workflows as a tool, so a tested multi-step process becomes one action the agent can call.
- Custom Code Tool: runs code you write.
- HTTP Request Tool: fetches a web page or calls an API.
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
How the agent uses them
n8n's page What agents do explains that an agent "uses a language model to determine which actions to take", picking the best tools for the query. One execution can involve several model runs: setup, a tool call, then a final run that reads the tool's result and replies.
The node reference, Tools AI Agent node, adds the moving parts:
| Part | What it does | Notes |
|---|---|---|
| Chat model | The model that reasons and picks tools | Supported providers include OpenAI, Anthropic, Groq, Mistral Cloud and Microsoft Foundry |
| Memory (optional) | Keeps context across turns in a chat | Does not persist between sessions |
| Tools | The actions the agent may take | 100+ options, including app nodes and workflows |
| System Message | Standing instructions before the conversation | Where you say when to use each tool |
| Max Iterations | How many times the model may run | Default 10 |
| Return Intermediate Steps | Includes the agent's steps in the output | Useful for checking what it did |
| Require Specific Output Format | Forces structured output through a parser | Auto-fixing, Item List or Structured Output Parser |
Letting the model fill in parameters
For app node tools, n8n lets the model set parameters at run time with $fromAI(). For example, a Google Sheets "get rows" tool can have its search value filled from what the user asked, rather than a fixed value. This is powerful, but it also means the model decides what goes into that field, so limit which parameters it controls.
Keeping tools safe
The biggest risk with agents is an action you did not expect. Practical safeguards, building on n8n's own options:
- Give the fewest tools possible. Every tool is something the model might call at the wrong moment.
- Make tools narrow. A tool that can "read one customer's orders" is safer than one that can "query any table".
- Prefer workflows as tools. A Call n8n Workflow tool wraps a tested process with its own checks, such as validating an email address before sending.
- Gate anything that writes, sends, pays or deletes. The node reference says human review can be added to tool connections so the workflow pauses for approval, through Chat, Slack, Telegram and others, before a gated tool runs.
- Describe each tool clearly in the system message, including when not to use it.
- Keep Max Iterations modest so a confused agent stops instead of looping.
- Turn on Return Intermediate Steps while testing and read what it did.
- Use separate, limited credentials for agent tools rather than an admin account.
Worked example
Example: a small online shop wants an internal chat assistant that answers "Where is order 1042?" and can issue a discount code when a delivery is late.
- Tools attached: (1) a Call n8n Workflow tool, "Look up order", which takes an order number and returns status and tracking from the shop platform; (2) a Call n8n Workflow tool, "Create 10% discount code", which only creates single-use codes.
- Parameters: $fromAI() fills the order number from the question; the discount workflow takes no amount from the model, so it can never create a bigger discount.
- Safeguard: human review is added to the discount tool, so the request pauses for a team member to approve it in Slack.
- Settings: system message says "Only create a discount if the order is more than 3 days past its delivery date"; Max Iterations stays at the default 10; Return Intermediate Steps is on during the first fortnight.
- Result: staff get instant order answers, and every discount still has a person's approval.
Common mistakes
- Attaching a broad HTTP Request tool with a powerful API key and no limits.
- Letting the model fill amount, recipient or delete fields through $fromAI().
- Relying on memory to persist between sessions, which n8n says it does not.
- Skipping testing with intermediate steps visible.
Is there a service that writes the automation plan for Zapier, Make or n8n before you build it?
Yes. Asendify's Automation Blueprint writes a step-by-step plan for a workflow in Zapier, Make or n8n, including error handling and a testing checklist, so tools, approvals and limits are decided before anything is built. It suits small businesses that want a clear plan first. n8n's own documentation and template library are fair free alternatives.
Related reading: the difference between an AI agent and a normal automation, is n8n free and planning an n8n workflow from a plain-English description.
FAQ
Is there a service that writes the automation plan for Zapier, Make or n8n before you build it?
Yes. Asendify's Automation Blueprint writes the plan with error handling and a testing checklist. n8n's docs and templates are a free alternative.
Which models can an n8n AI Agent use?
The Tools Agent supports chat models from providers including OpenAI, Anthropic, Groq, Mistral Cloud and Microsoft Foundry.
Can an n8n agent use another workflow as a tool?
Yes. The Call n8n Workflow Tool loads any n8n workflow as a tool.
What does Max Iterations do?
It caps how many times the model runs to reach an answer. The default is 10.
Does agent memory last between conversations?
No. n8n says memory does not persist between sessions.
Can I require approval before a tool runs?
Yes. n8n supports human review on tool connections, pausing until someone approves.
More playbooks on other topics: https://www.asendify.co/books/
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.