> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usegradient.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

> The four tool shapes a node can carry (agent_swap, end_call, custom, and http_req) and how they attach and run.

A node's tools are the only things the model can do from that node. Each tool is a row attached to the node, and the engine turns those rows into the tool list it hands the model on every turn.

## The four shapes

| Shape        | What it does                              | What runs it                |
| ------------ | ----------------------------------------- | --------------------------- |
| `agent_swap` | Hands control to another node             | The engine                  |
| `end_call`   | Ends the conversation                     | The engine                  |
| `custom`     | Calls your organization's deployed code   | The engine, via the console |
| `http_req`   | Makes a declarative external HTTP request | The engine                  |

### agent\_swap: hand off to another node

Moves control to another node in the topology. This is how a graph is built: every edge on the canvas is an `agent_swap` tool, and its description tells the model when to take the path. See [Agents and topology](/build/agents).

### end\_call: end the conversation

Ends the conversation when the caller's goal is complete. The engine closes the turn loop.

### custom: call your deployed code

Calls a handler your organization has deployed to Gradient. The engine runs it, appends the result to the transcript, and calls the model again on the same node. Authoring and deploying are covered in [Custom tools](/build/custom-tools).

<Note>
  Attaching a custom tool floats the node's draft to the **latest deployed version** of that tool. Publishing the agent **pins the exact version**, so redeploying the tool later never silently changes an agent already serving traffic.
</Note>

### http\_req: a declarative external request

Makes an HTTP request defined entirely by the tool's config, with no code to deploy. The config is a small object:

```json theme={null}
{
  "url": "https://api.example.com/patients",
  "method": "POST",
  "headers": { "authorization": "Bearer ..." },
  "body": { "id": "123" }
}
```

`method` defaults to `GET`. The engine performs the request and returns the response status and body into the turn. The model can pass optional per-call `overrides`, though most `http_req` tools need none.

## Attaching tools to a node

Open a node in the builder and add tools to it. A custom tool must be **deployed** before it can be attached. Every tool is a row on the node, so it travels with the node when you publish; a published version calls exactly the tools it was published with.

<Tip>
  Knowledge bases and skills also give a node callable affordances: a search tool for a knowledge base, and a load-on-demand tool for skills. See [Knowledge and skills](/build/knowledge-and-skills). Voice agents can additionally transfer a live call to another number; see [Voice](/run/voice).
</Tip>

<CardGroup cols={2}>
  <Card title="Custom tools" href="/build/custom-tools">
    Author, deploy, and invoke your own code as tools the engine calls.
  </Card>

  <Card title="Knowledge and skills" href="/build/knowledge-and-skills">
    Attach searchable documents and reusable instructions to a node.
  </Card>
</CardGroup>
