# Giving an Agent Tools — AI Automation with n8n

Source: https://www.geekswithgeeks.com/en/n8n-ai-automation/tools-agent-tools

> Expose HTTP calls and other workflows as tools with clear names and descriptions.

## Tools are described to the model

You can attach many tool types to an agent: the **HTTP Request Tool**, a **Code Tool**, app tools (Gmail, Slack, a database), or **Call n8n Workflow Tool** which runs another workflow. The tool's **name and description** are what the model reads, so write them like documentation: what it does, when to use it and what inputs it needs. Using a sub-workflow as a tool is a clean way to keep complex logic testable.

## Knowledge and action

Tools give an agent hands, memory gives it continuity, and RAG gives it your own knowledge.

![Four parts: tools, memory, retrieval, answer.](assets/figures/n8n-ai-automation/section-5-map.svg) — Figure 5.1 — Tools, memory, retrieval and answer.

## A well-described tool

Compare this with a vague "Gets data" description. The detailed one tells the model the input format, the scope and that the tool is read-only.

```text
Tool name:  get_order
Description: Look up one order by its numeric order number (for example 10482).
             Returns status, items and delivery date. Read-only. Use for any question
             about where an order is. Do not use for refunds.
```

## Separate read and write tools

Give the agent read tools freely, but put actions that change data (refunds, emails, deletes) behind separate tools you can restrict or require approval for.

**Quiz:** What does the model use to decide which tool to call?

- [ ] The order nodes were created
- [ ] The tool's colour on the canvas
- [x] The tool's name and description
- [ ] The workflow ID

*Answer:* The tool's name and description. The model only sees the descriptions and input schema, so they must be accurate and specific.
