1. Home
  2. n8n
  3. How Tools Work on the n8n AI Agent Node

How Tools Work on the n8n AI Agent Node

Every n8n AI agent needs at least one tool. Here is what a tool is, which ones you can attach, and how to write descriptions the agent will follow.

published

An AI agent in n8n does not act alone. The docs say the AI Agent node lets you build an agent. The agent uses external tools and APIs to perform actions and retrieve information. The agent itself decides what to do. The tools are how it does it. If you are new to the node itself, start with the n8n AI Agent node.

What a tool is on the AI Agent node

A tool is a sub-node you connect to the AI Agent node. It gives the agent a way to act, such as calling an API or running a SQL query. The docs say the AI agent can understand what different tools do and decide which one fits the task. The agent picks between them based on your instructions and the task at hand.

You cannot skip this part. The docs say you must connect at least one tool sub-node to an AI Agent node. An agent with no tools has nothing to act with. The docs also say all AI Agent nodes now work as a Tools Agent, so the tool setup applies across the board.

The tools you can attach

The docs name a few tool sub-nodes worth knowing:

  • HTTP Request for calling any app or service with a REST API.
  • Postgres or MySQL for SQL use cases.
  • MCP Client Tool for using the tools of an external MCP server.
  • Message an Agent Tool for handing work to another agent.

The docs also say to use sub-agents when a task has clearly separate parts. The docs say connecting Message an Agent Tool to the AI Agent node lets an agent hand work to another agent.

Using the HTTP Request node as a tool

The docs say the HTTP Request node makes requests to query data from any app or service with a REST API. You can use it as a regular node or attached to an AI agent as a tool.

This one needs a little knowledge. The docs say using it means creating a REST API call, so you need basic API knowledge. You can set up the request by configuring parameters or by importing a curl command. The docs say you can copy curl examples straight from an API's documentation into the node.

One option matters a lot here. The docs say the optimize response option reduces the data passed to the LLM when the node is an agent tool. It can help the LLM ignore unimportant details. Turn this on when the response is large.

Bringing in MCP tools

The MCP Client Tool node is a Model Context Protocol client that uses the tools of an external MCP server. The docs for this node say you can connect it to your models to call external tools with n8n agents. For what the two sides of that connection trade, see what MCP clients and servers offer each other.

You choose what the agent sees. The docs say the Tools to Include parameter picks which tools to expose to the AI Agent. The Selected option lets you pick the tools yourself. The All Except option gives the agent every MCP server tool you do not select. If you want to expose your own tools instead, read about how to build an MCP server.

Writing tool descriptions the agent will follow

Model makers' docs put weight on how a tool is described. Anthropic's docs say Claude decides when to call a tool based on the user's request and the tool's description. So the description is doing real work.

Anthropic's guide says to think about tool definitions as carefully as you think about your overall prompts. It says a good definition often includes example usage, edge cases, input format requirements, and clear boundaries from other tools. OpenAI's docs say names, parameter descriptions, and instructions for a function should be clear and detailed. Say what the function is for, what every parameter means, and what the result shows.

OpenAI offers a test: hand a person only what you gave the model, and see if they can run the function. If not, the description is too thin.

When the agent does not call the tool

The docs say an agent decides which tool to use based on your instructions and the task. So the first fix is the instructions. The docs say to keep agent instructions specific and refine them first if the agent misbehaves.

Then test and iterate. Anthropic's guide says to watch how the model handles your tools, then keep fixing what it gets wrong. It also says to shape the tool arguments in a way that makes errors less likely.

Too many tools can be the cause too. OpenAI's docs say to keep the number of initially available functions small for higher accuracy. The guide adds that tool overload is about tools being similar or overlapping, not only about how many there are. If clearer names, parameters, and descriptions do not help, OpenAI says to use multiple agents. It also says to divide the work between more agents when the tool count keeps climbing.

Approval for sensitive tools

Some tools should not run on their own. The docs say you can require approval before an agent runs sensitive tools. A sensitive tool call pauses until you approve or reject it. That gives you a checkpoint before anything reaches the client's systems.

Test before you ship. The docs say you can preview an agent to test it without publishing. Run the agent through the client's tasks and refine the descriptions until it picks the right tools.

Sources