# List a connector’s tools for writing a restriction

> Source: https://elaichi.ai/docs/api-reference/restrictions/restriction/listrestrictioncatalogtools/

`GET /restriction/connector/{slug}/tools`

Resource: **Restriction** · API: **Restrictions**

## Path parameters

- **`slug`** _(string, required)_
  Connector slug.

## Query parameters

- **`q`** _(string)_
  Case-insensitive substring match on `tool_label`, `name`, `description` and `resource`. LIKE wildcards are matched literally. Max 200 characters.

## Response body

- **`result`** _(array<object>)_
  - **`name`** _(string)_
    Exact tool name — what `tools[].tool_name` must contain.
  - **`tool_label`** _(string)_
    The same server-computed phrase a saved rule’s `tools[].tool_label` carries for this tool, so a tool reads the same in the picker as on the saved rule.
  - **`description`** _(string)_
  - **`resource`** _(string)_
  - **`method`** _(string)_
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/restriction/connector/<slug>/tools' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/restriction/connector/<slug>/tools', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

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

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/restriction/connector/<slug>/tools"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

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