# List tools

`GET` `https://goblins-call-api.onrender.com/v1/tools`

Returns one agent’s tools, or every tool in your workspace when no agent is named.

Needs a [workspace API key](https://www.cracklehq.com/docs/authentication).

## Query parameters

- `agentId` (string, optional): Only this agent’s tools.
- `userId` (string, optional): A workspace ID. A key belongs to one workspace, so this is never needed with one; naming another workspace answers `403`.

## Errors

- `404`: No agent in your workspace has that ID.

Every request can also answer `401`, `429` and `500`: see [Errors](https://www.cracklehq.com/docs/errors).

Request:

cURL:

```bash
curl "https://goblins-call-api.onrender.com/v1/tools?agentId=ua_3f9a1c2b" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/tools?agentId=ua_3f9a1c2b', {
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.get(
    "https://goblins-call-api.onrender.com/v1/tools?agentId=ua_3f9a1c2b",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 200 OK:

```json
{
  "tools": [
    {
      "id": "tool_5d2e8a41c07b",
      "agentId": "ua_3f9a1c2b",
      "name": "check_order_status",
      "kind": "during_call",
      "method": "GET",
      "url": "https://your-app.com/api/orders/{{order_id}}",
      …
    }
  ]
}
```

Source: https://www.cracklehq.com/docs/reference/tools/list
