# List tools for an agent

> GET https://api.nabrah.ai/api/ext/tool/agent/{agent_id}

Group: Tools. Page: https://www.nabrah.ai/en/docs/api-reference/tools/list-tools-for-an-agent

List every tool attached to the given agent. This is the inverse of listing agents for a tool: it returns the full tool records (url, method, parameters, etc.) that the agent can invoke during a conversation. Each tool includes a link_id identifying its link to this agent, which you pass to DELETE /api/ext/tool/unlink/{link_id} to detach it. Identified by the agent_id path parameter and authenticated with your API key.

## Response fields

- **Linked tool record**: Each item is a full tool record. id is the tool_id; parameters is the full parameter list; timeout_seconds and method describe the webhook call. link_id identifies the link between this tool and the agent — pass it to the unlink endpoint to detach the tool from this agent. Fields: `id`, `name`, `description`, `url`, `method`, `project_id`, `timeout_seconds`, `parameters`, `link_id`.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Path parameters

- `agent_id` (string, required): The ID of the agent whose tools you want to list. Obtain it from GET /api/ext/agent (the id field).

## Response

### 200 Successful Response

Content type: `application/json`

```json
[
  {
    "name": "string",
    "description": "string",
    "url": "string",
    "method": "GET",
    "id": "00000000-0000-4000-8000-000000000000",
    "project_id": "00000000-0000-4000-8000-000000000000",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z",
    "timeout_seconds": 5,
    "parameters": [
      {
        "name": "string",
        "location": "query",
        "parameter_type": "constant",
        "data_type": "string",
        "description": "string",
        "tool_id": "00000000-0000-4000-8000-000000000000",
        "required": false,
        "value": "string",
        "default_value": "string"
      }
    ],
    "link_id": "00000000-0000-4000-8000-000000000000"
  }
]
```

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/tool/agent/<agent_id>' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/tool/agent/<agent_id>"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/tool/agent/<agent_id>", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/tool/agent/<agent_id>", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
