---
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"
updated: "2026-11-17"
---

# 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, 3 of them read-only.

- [`ecom_library_list_reference_images`](#ecom_library_list_reference_images): List reference images
- [`ecom_reference_image_manage`](#ecom_reference_image_manage): Add, pin, or remove a reference image
- [`ecom_library_list_ads`](#ecom_library_list_ads): List generated ads or Recently deleted
- [`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       | Pass "detailed" when you need full text or nested details. 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         |                                                                                          |
| `notice`     | string          | Present when results were left out to keep the response small. Says how to see the rest. |

### Example

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

## `ecom_reference_image_manage`

**Add, pin, or remove a reference image**

Manages the saved reference images that image ads and image edits can follow. upload saves a picture (the same picture twice returns the saved one). set\_pinned pins or unpins one so it lists first. remove deletes one; ads made with it keep their images.

| Property        | Value                       |
| --------------- | --------------------------- |
| Access          | Changes or deletes data     |
| Scope           | Ads: write (`ads:write`)    |
| Credits         | Free                        |
| Who can call it | Workspace owners and admins |

### Input

| Field    | Type          | Required                                  | Description                                                                                                                                                  |
| -------- | ------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `action` | enum          | Yes                                       | upload (pass file), set\_pinned (pass id and pinned), or remove (pass id). id comes from the reference image list. One of: `upload`, `set_pinned`, `remove`. |
| `file`   | object        | When `action` is `upload`                 | The picture to save. PNG, JPEG or WebP, up to 8 MB. Pass a ChatGPT attachment, an upload\_id from create\_file\_upload, or a public https url.               |
| `id`     | string (uuid) | When `action` is `set_pinned` or `remove` |                                                                                                                                                              |
| `pinned` | boolean       | When `action` is `set_pinned`             |                                                                                                                                                              |

### Output

The result is text for the model to read.

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ecom_reference_image_manage",
    "arguments": {
      "action": "upload",
      "file": {
        "url": "https://example.com/file.png"
      }
    }
  }
}
```

## `ecom_library_list_ads`

**List generated ads or Recently deleted**

Lists generated ads in the workspace. library returns visible ads across the workspace, or on one board when boardId is passed. deleted returns Recently deleted ads, most recently deleted first, with when each was deleted; use their submissionId and variationId to restore 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                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `kind`            | enum           | Yes      | library for visible ads (optionally pass boardId), deleted for Recently deleted. One of: `library`, `deleted`.                                                                                                                                                                                                                                      |
| `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 (uuid)  | No       |                                                                                                                                                                                                                                                                                                                                                     |
| `sortBy`          | enum           | No       | newest by default; recently\_edited puts edited ads first. One of: `newest`, `recently_edited`.                                                                                                                                                                                                                                                     |
| `limit`           | integer        | No       | Between 1 and 100. Defaults to `25`.                                                                                                                                                                                                                                                                                                                |
| `cursor`          | string or null | No       |                                                                                                                                                                                                                                                                                                                                                     |
| `response_format` | enum           | No       | Pass "detailed" when you need full text or nested details. One of: `concise`, `detailed`. Defaults to `"concise"`.                                                                                                                                                                                                                                  |

### Output

The result is text for the model to read.

### Example

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

## `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)
