---
title: "Ad library tools"
description: "List generated ads, get download links, and delete, restore or permanently remove ads."
url: "https://sellify.ai/docs/developers/mcp-tools/library"
---

# Ad library tools

> List generated ads, get download links, and delete, restore or permanently remove ads.

List generated ads, get download links, and delete, restore or permanently remove ads. This page lists 10 tools, 4 of them read-only.

- [`ecom_library_list_reference_images`](#ecom_library_list_reference_images): List reference images
- [`ecom_library_list_deleted_ads`](#ecom_library_list_deleted_ads): List Recently deleted ads
- [`ecom_library_list_ads`](#ecom_library_list_ads): List generated ads
- [`ecom_library_get_download_link`](#ecom_library_get_download_link): Get a ZIP download link for ads
- [`ecom_library_set_ad_boards`](#ecom_library_set_ad_boards): Replace the boards one ad is saved to
- [`ecom_library_save_ads_to_boards`](#ecom_library_save_ads_to_boards): Save ads to boards
- [`ecom_library_remove_ad_from_board`](#ecom_library_remove_ad_from_board): Remove an ad from a board
- [`ecom_library_delete_ads`](#ecom_library_delete_ads): Delete ads from the library
- [`ecom_library_restore_ads`](#ecom_library_restore_ads): Restore deleted ads
- [`ecom_library_hard_delete_ads`](#ecom_library_hard_delete_ads): Permanently delete ads

## `ecom_library_list_reference_images`

**List reference images**

Lists the reference images this workspace uploaded for image ads and hero images, pinned images first, then most recently used. Each image has a temporary url to view it and a storagePath that identifies it in the app.

| Property       | Value                  |
| -------------- | ---------------------- |
| Access         | Read-only              |
| Scope          | Ads: read (`ads:read`) |
| Credits        | Free                   |
| Safe to repeat | Yes                    |

### Input

| Field             | Type           | Required | Description                                                                                                                                                                                                                      |
| ----------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pinnedOnly`      | boolean        | No       |                                                                                                                                                                                                                                  |
| `limit`           | integer        | No       | Between 1 and 100. Defaults to `25`.                                                                                                                                                                                             |
| `cursor`          | string or null | No       |                                                                                                                                                                                                                                  |
| `response_format` | enum           | No       | "concise" (the default) shortens long text and leaves out nested details in each result. Pass "detailed" only when you need the full text or nested details of a result. One of: `concise`, `detailed`. Defaults to `"concise"`. |

### Output

| Field        | Type            | Description      |
| ------------ | --------------- | ---------------- |
| `images`     | array of object | Items up to 100. |
| `total`      | integer         |                  |
| `nextCursor` | string or null  |                  |
| `hasMore`    | boolean         |                  |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_list_reference_images",
    "arguments": {}
  }
}
```

## `ecom_library_list_deleted_ads`

**List Recently deleted ads**

Lists ads in Recently deleted, most recently deleted first, with when each was deleted and the total count. These ads are hidden from the library and boards. Use the returned submissionId and variationId to restore them or permanently delete them.

| Property       | Value                  |
| -------------- | ---------------------- |
| Access         | Read-only              |
| Scope          | Ads: read (`ads:read`) |
| Credits        | Free                   |
| Safe to repeat | Yes                    |

### Input

| Field             | Type           | Required | Description                                                                                                                                                                                                                      |
| ----------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`           | integer        | No       | Between 1 and 100. Defaults to `25`.                                                                                                                                                                                             |
| `cursor`          | string or null | No       |                                                                                                                                                                                                                                  |
| `response_format` | enum           | No       | "concise" (the default) shortens long text and leaves out nested details in each result. Pass "detailed" only when you need the full text or nested details of a result. One of: `concise`, `detailed`. Defaults to `"concise"`. |

### Output

| Field        | Type            | Description      |
| ------------ | --------------- | ---------------- |
| `ads`        | array of object | Items up to 100. |
| `total`      | integer         |                  |
| `nextCursor` | string or null  |                  |
| `hasMore`    | boolean         |                  |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_list_deleted_ads",
    "arguments": {}
  }
}
```

## `ecom_library_list_ads`

**List generated ads**

Lists visible generated ads across the workspace or, when boardId is provided, on one active board. Soft-deleted ads are excluded.

| Property       | Value                  |
| -------------- | ---------------------- |
| Access         | Read-only              |
| Scope          | Ads: read (`ads:read`) |
| Credits        | Free                   |
| Safe to repeat | Yes                    |

### Input

| Field             | Type           | Required | Description                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `boardId`         | string (uuid)  | No       |                                                                                                                                                                                                                                                                                                                                                     |
| `query`           | string         | No       | Length up to 120.                                                                                                                                                                                                                                                                                                                                   |
| `adType`          | enum           | No       | One of: `prompt_led`, `recreate_saved_ad`, `product_highlight`, `lifestyle`, `before_after`, `benefit_callout`, `announcement`, `promotion_discount`, `facts_statistics`, `faq_explainer`, `features_benefits`, `holiday_seasonal`, `humor_fun`, `native_ad`, `reasons_why`, `testimonial_reviews`, `ugc`, `unboxing`, `us_vs_them`, `user_upload`. |
| `aspectRatio`     | enum           | No       | One of: `1:1`, `4:5`, `16:9`, `9:16`, `1.91:1`.                                                                                                                                                                                                                                                                                                     |
| `productId`       | string         | No       |                                                                                                                                                                                                                                                                                                                                                     |
| `limit`           | integer        | No       | Between 1 and 100. Defaults to `25`.                                                                                                                                                                                                                                                                                                                |
| `cursor`          | string or null | No       |                                                                                                                                                                                                                                                                                                                                                     |
| `response_format` | enum           | No       | "concise" (the default) shortens long text and leaves out nested details in each result. Pass "detailed" only when you need the full text or nested details of a result. One of: `concise`, `detailed`. Defaults to `"concise"`.                                                                                                                    |

### Output

| Field            | Type            | Description      |
| ---------------- | --------------- | ---------------- |
| `ads`            | array of object | Items up to 100. |
| `nextCursor`     | string or null  |                  |
| `hasMore`        | boolean         |                  |
| `scanIncomplete` | boolean         |                  |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_list_ads",
    "arguments": {}
  }
}
```

## `ecom_library_get_download_link`

**Get a ZIP download link for ads**

Returns a link that downloads image ads as one ZIP file: chosen ads (adRefs), every visible ad from one generation (submissionId), or every ad on one board (boardId), up to 100 ads. Pass exactly one of the three. The link works for 30 minutes, and only for the same Sellify user signed in to the app in their browser.

| Property       | Value                  |
| -------------- | ---------------------- |
| Access         | Read-only              |
| Scope          | Ads: read (`ads:read`) |
| Credits        | Free                   |
| Safe to repeat | Yes                    |

### Input

| Field          | Type            | Required | Description     |
| -------------- | --------------- | -------- | --------------- |
| `adRefs`       | array of object | No       | Items 1 to 100. |
| `submissionId` | string (uuid)   | No       |                 |
| `boardId`      | string (uuid)   | No       |                 |

### Output

| Field         | Type         | Description |
| ------------- | ------------ | ----------- |
| `downloadUrl` | string (uri) |             |
| `expiresAt`   | string       |             |
| `adCount`     | integer      | Up to 100.  |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_get_download_link",
    "arguments": {}
  }
}
```

## `ecom_library_set_ad_boards`

**Replace the boards one ad is saved to**

Sets the exact set of boards a single generated ad belongs to, adding it to the listed boards and removing it from every other board. Read the ad's current boardIds first and include every board it should stay on. Pass an empty boardIds list to remove the ad from all boards. If a board is publicly shared, ads added to it are visible to anyone with its share link.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Changes or deletes data          |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field      | Type                   | Required | Description     |
| ---------- | ---------------------- | -------- | --------------- |
| `adRef`    | object                 | Yes      |                 |
| `boardIds` | array of string (uuid) | Yes      | Items up to 50. |

### Output

| Field      | Type            | Description |
| ---------- | --------------- | ----------- |
| `success`  | true            |             |
| `boardIds` | array of string |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_set_ad_boards",
    "arguments": {
      "adRef": {
        "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "variationId": "example"
      },
      "boardIds": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    }
  }
}
```

## `ecom_library_save_ads_to_boards`

**Save ads to boards**

Adds one or more generated ads to one or more boards without removing existing memberships. Memberships that already exist are skipped, so repeating the save is safe. If a board is publicly shared, ads added to it are visible to anyone with its share link.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Writes data                      |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field      | Type                   | Required | Description     |
| ---------- | ---------------------- | -------- | --------------- |
| `adRefs`   | array of object        | Yes      | Items 1 to 100. |
| `boardIds` | array of string (uuid) | Yes      | Items 1 to 50.  |

### Output

| Field                      | Type    | Description |
| -------------------------- | ------- | ----------- |
| `success`                  | true    |             |
| `savedCount`               | integer |             |
| `requestedAdCount`         | integer |             |
| `requestedBoardCount`      | integer |             |
| `requestedMembershipCount` | integer |             |
| `boardSavedCounts`         | object  |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_save_ads_to_boards",
    "arguments": {
      "adRefs": [
        {
          "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "variationId": "example"
        }
      ],
      "boardIds": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    }
  }
}
```

## `ecom_library_remove_ad_from_board`

**Remove an ad from a board**

Removes one generated ad from one board. The ad stays in the library and on any other boards. Repeating the removal reports success.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Changes or deletes data          |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field     | Type          | Required | Description |
| --------- | ------------- | -------- | ----------- |
| `adRef`   | object        | Yes      |             |
| `boardId` | string (uuid) | Yes      |             |

### Output

| Field     | Type | Description |
| --------- | ---- | ----------- |
| `success` | true |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_remove_ad_from_board",
    "arguments": {
      "adRef": {
        "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "variationId": "example"
      },
      "boardId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  }
}
```

## `ecom_library_delete_ads`

**Delete ads from the library**

Moves one or more generated ads to Recently deleted. They disappear from the library, boards, and downloads but can be restored later with their board memberships intact.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Changes or deletes data          |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field    | Type            | Required | Description     |
| -------- | --------------- | -------- | --------------- |
| `adRefs` | array of object | Yes      | Items 1 to 100. |

### Output

| Field              | Type    | Description |
| ------------------ | ------- | ----------- |
| `success`          | true    |             |
| `hiddenCount`      | integer |             |
| `newlyHiddenCount` | integer |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_delete_ads",
    "arguments": {
      "adRefs": [
        {
          "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "variationId": "example"
        }
      ]
    }
  }
}
```

## `ecom_library_restore_ads`

**Restore deleted ads**

Restores one or more ads from Recently deleted back into the library, including their previous board memberships. Only ads currently in Recently deleted are restored: when restoredCount is lower than requestedCount, the other ads were not in Recently deleted and were left unchanged. If a restored ad returns to a publicly shared board, it is visible again to anyone with the board share link.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Writes data                      |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field    | Type            | Required | Description     |
| -------- | --------------- | -------- | --------------- |
| `adRefs` | array of object | Yes      | Items 1 to 100. |

### Output

| Field            | Type    | Description |
| ---------------- | ------- | ----------- |
| `success`        | true    |             |
| `restoredCount`  | integer |             |
| `requestedCount` | integer |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_restore_ads",
    "arguments": {
      "adRefs": [
        {
          "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "variationId": "example"
        }
      ]
    }
  }
}
```

## `ecom_library_hard_delete_ads`

**Permanently delete ads**

Permanently and irreversibly deletes ads that are already in Recently deleted: their images, edit history, board memberships, and Recently deleted entries are removed and cannot be recovered. Resolve the ads with the Recently deleted list tool; ads still in the library are refused. Only call this when the user has explicitly asked for permanent deletion or to empty Recently deleted.

When the user asks for this, call it directly: Sellify asks the user to confirm before anything is deleted. If it returns mcp\_confirmation\_required, show the user its question and retry with confirmation\_token only after they say yes.

| Property        | Value                            |
| --------------- | -------------------------------- |
| Access          | Changes or deletes data          |
| Scope           | Library: write (`library:write`) |
| Credits         | Free                             |
| Who can call it | Workspace owners and admins      |
| Safe to repeat  | Yes                              |

### Input

| Field                | Type            | Required | Description                                                                                                              |
| -------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `adRefs`             | array of object | Yes      | Items 1 to 100.                                                                                                          |
| `confirmation_token` | string          | No       | Only for retrying a call that returned mcp\_confirmation\_required: the exact token from that result. Never make one up. |

### Output

| Field          | Type    | Description |
| -------------- | ------- | ----------- |
| `success`      | true    |             |
| `deletedCount` | integer |             |

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_library_hard_delete_ads",
    "arguments": {
      "adRefs": [
        {
          "submissionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "variationId": "example"
        }
      ]
    }
  }
}
```

## Related

[Tool reference overview](https://sellify.ai/docs/developers/mcp-tools) · [Authentication](https://sellify.ai/docs/developers/authentication) · [Credits and limits](https://sellify.ai/docs/developers/credits-and-limits)
