---
title: Completing Your AI Agent by Adding Tools to It
privateVideoUrl: https://stream.mux.com/QVXBkIQoPGEoUQ9ej4XQxGrSsh9BEyFyP3xyVQIE00S00.m3u8
isPublicLesson: true
---

Welcome to Lesson 7. In Lesson 6, we set up a Chat Trigger, AI Agent, chat model, and memory to make our AI conversational. Now, we’re stepping it up by **connecting our AI agent to Linear**, so it can get and create tasks in our task manager. We’ll add two Linear tools to make this happen — all without writing a single line of code. By the end, your AI will be managing tasks like a pro.

## Adding the First Linear Tool: Get Tasks

To make our AI agent talk to Linear, we need to give it a **tool**. Tools let the AI interact with apps like Linear, and n8n has over 300 integrations, so you’ll likely find what you need. Let’s add a tool to get tasks from Linear:

1. At the bottom of the **AI Agent**’s node click **Tool**.
2. Search for **Linear** in the tool list (you’ll see other options like LinkedIn or X, but we want Linear). Select it.
3. A settings window opens. First, set up **Credentials**:
    - If you haven’t added your Linear API key yet, click “Create New Credential,” paste the key from Linear (see Lesson 4), and save it. Non-technical folks, this is where you use that API key we grabbed while going through Linear account!
    - If you already have it (like we set up in the Credentials tab), select your Linear credential.
4. For **Tool Description**, click “Set Manually.” This is super important because it tells the AI what the tool does. Type: `Get the list of all tasks from the Linear task manager via API.` This clear description helps the AI know when to use this tool.
5. Under **Resources**, leave it as “Issue” (Linear’s term for tasks).
6. For **Operation**, choose **Get Many** to fetch multiple tasks. To keep it simple, check **Return All** to get all tasks in your Linear account.
7. Click outside to save. Your Linear tool appears on the canvas, connected to the AI Agent.

Let’s rename the tool for clarity:

- Click the tool node, then click the name at the top.
- Change it to **Get Linear Tasks** and save. Now it’s easy to understand what it does.

### Why the Description Matters

The description you provide for each tool is shared with the language model (LLM) in your AI Agent. The LLM uses these descriptions to reason about which tool to call based on your query. When you send a chat message, the LLM evaluates all tool descriptions alongside your input and picks the best match to complete the task. For example, if you ask, “I want a list of tasks” and have a tool described as “Get list of tasks from Linear” the LLM will choose this tool.

A vague description like “Do stuff with Linear” might confuse the LLM, but “Fetch all tasks from Linear’s project management tool via API” tells it exactly what the tool does.

If you just say “Hi,” it won’t trigger the tool because it’s not task-related. This is exactly why providing high-quality, detailed descriptions is so important.

## Testing the Get Tasks Tool

Let’s test it! Open the **Chat Trigger**’s chat window:

- Type “Hi” and send. The AI replies, “Hello, how can I assist you?” No tasks are fetched because “Hi” doesn’t match the tool’s purpose.
- Now type, “Give me a list of titles for all my available tasks,” and send.

Boom! The canvas shows the Get Linear Tasks tool running, and the list with your task titles. Check the **Execution Log** (bottom of the screen) to see the flow:

- The AI used Simple Memory for context.
- It read your question and the tool descriptions.
- It chose the Get Linear Tasks tool, ran it, and got the tasks.
- The results went back to the AI, which formatted the output and saved it to memory.

## Adding the Second Linear Tool: Create Tasks

Now, let’s teach our AI to **create new tasks** in Linear. We’ll add another tool:

1. At the bottom of the **AI Agent**’s node click **Tool** again.
2. Search for **Linear** and select it.
3. Set up **Credentials** — choose your Linear credential, same as before.
4. For **Tool Description**, click “Set Manually” and type: `Linear task manager API for creating new issue/task. It already has team name and ID provided and doesn't require fetching it.` This tells the AI this tool creates tasks.
5. Under **Resources**, keep it as “Issue.”
6. For **Operation**, choose **Create** to make a new task.
7. For **Team Name or ID**, n8n uses your API key to fetch your Linear teams. Select your team from the dropdown.
8. For **Title** and **Description**, here’s the cool part: click the **stars button** next to each. This tells the AI to automatically fill these fields based on the chat input, so you don’t have to type them manually. Older n8n versions needed a script for this, but now it’s built-in!
9. Click outside to save. Rename the tool to **Create Linear Task** for clarity.

## Testing the Create Task Tool

Let’s test the new tool. In the **Chat Trigger**’s chat window:

- Type, `Please add a new task about how to cook scrambled eggs with the recipe included`, and send.

Watch the canvas — the Create Linear Task tool runs, and the Execution Log shows it was successful. Now, go to your Linear account:

- In the **Backlog** tab, you’ll see a new task, like “How to cook scrambled eggs,” created today.
- Click it to see the description — the AI automatically filled in a recipe for scrambled eggs, exactly as we wanted.

This is awesome! The AI used the chat input to set the task title and description, created it in Linear, and it all worked seamlessly.
