# Tools · Downloads

> MCP tools for the Downloads module: setting up the space, creating items, uploading, replacing, removing and reordering files, publishing, getting the 5-minute link, seeing your downloads and the team's counters.

The [Downloads](/espacos/downloads) module through the assistant: setting up the space (repository or one file only, categories, approval), creating the item, uploading the files by link or file, publishing, seeing what you can download and the team's counters.

Each tool carries a badge: <span class="tool-kind tool-kind-read">Read-only</span> changes nothing, <span class="tool-kind tool-kind-write">Changes</span> creates or changes something right away, and <span class="tool-kind tool-kind-confirm">Asks to confirm</span> only acts after your yes to a summary. See [Money and confirmation](/mcp/dinheiro-e-confirmacao).

## In short

| Tool | What it does | Minimum role | Type |
|---|---|---|---|
| [`get_downloads_space_settings`](#get-downloads-space-settings) | A Downloads space's mode, approval and categories | Anyone who sees the space | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`update_downloads_space_settings`](#update-downloads-space-settings) | Changes the mode, the approval and the list of categories | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`list_download_items`](#list-download-items) | The space's items, with filters | Anyone who sees the space | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`get_download_item`](#get-download-item) | One item, with files and product | Anyone who sees the space | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`create_download_item`](#create-download-item) | Creates an item (draft) with its product | Whoever the space lets create | <span class="tool-kind tool-kind-write">Changes</span> |
| [`update_download_item`](#update-download-item) | Edits the item, the stamp, the cover, and publishes | Author or team | <span class="tool-kind tool-kind-write">Changes</span> |
| [`delete_download_item`](#delete-download-item) | Deletes the item and its files | Author or team | <span class="tool-kind tool-kind-confirm">Asks to confirm</span> |
| [`upload_download_file`](#upload-download-file) | Uploads (or replaces) a file, by link or base64 | Author or team | <span class="tool-kind tool-kind-write">Changes</span> |
| [`remove_download_file`](#remove-download-file) | Removes a file | Author or team | <span class="tool-kind tool-kind-confirm">Asks to confirm</span> |
| [`reorder_download_files`](#reorder-download-files) | Changes the order of the files | Author or team | <span class="tool-kind tool-kind-write">Changes</span> |
| [`get_download_url`](#get-download-url) | The 5-minute link for a file | Anyone with access | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`list_my_downloads`](#list-my-downloads) | What you can download | Any | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`get_download_stats`](#get-download-stats) | How many downloads each file had | Moderator or finance | <span class="tool-kind tool-kind-read">Read-only</span> |

The space is created with [`create_space`](/mcp/ferramentas-comunidade#create-space) and `module: "downloads"`. Who can upload is the space's **Who can post** ([`update_space_access`](/mcp/ferramentas-comunidade#update-space-access)): by default, only the team. The item's price is set on the product created with it (`update_product`, `update_price`, `publish_product`; see [Sales and plans](/mcp/ferramentas-vendas)).

## `get_downloads_space_settings`

<span class="tool-kind tool-kind-read">Read-only</span>

**Space settings.** The mode (`multi`, repository; `single`, one file only), whether members' items wait for approval, and the categories (id, name and how many items). *Minimum role: anyone who sees the space.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` | id or link | Yes | The Downloads space |

**Ask like this:** *"How is the Materials space set up?"*

## `update_downloads_space_settings`

<span class="tool-kind tool-kind-write">Changes</span>

**Set up the space.** Changes the mode, the approval and the categories. Only what you send changes. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` | id or link | Yes | |
| `mode` | `multi` or `single` | No | `single` is refused while there are 2 or more items or files |
| `require_approval` | true or false | No | Members' items wait for the team |
| `categories` | list | No | The **complete** list, in order: an entry with `id` renames and reorders, one without `id` creates, and whatever is missing from the list is removed (refused while the category has items; the message says how many) |

Read [`get_downloads_space_settings`](#get-downloads-space-settings) first, to get the ids.

**Ask like this:** *"In the Materials space, create the Spreadsheets and E-books categories and require approval for what members upload."*

## `list_download_items`

<span class="tool-kind tool-kind-read">Read-only</span>

**The space's items.** Newest to oldest: title, category, files and status. The team and the author also see drafts and items in review. A paid item the person hasn't bought comes back **locked**: it shows the price and the product, without files. *Minimum role: anyone who sees the space.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` | id or link | Yes | |
| `category_id` | id | No | Filters by category |
| `status` | text | No | The item's status |
| `mine` | true or false | No | Only the ones you created |
| `search` | text | No | Searches the title |
| `page`, `limit` | numbers | No | Pagination |

## `get_download_item`

<span class="tool-kind tool-kind-read">Read-only</span>

**One item.** Description, category, files (id, name, type, size and, for the team, how many downloads), status and the product (price, whether it's free, whether it's sold out and your place on the waitlist). A locked item shows no files. *Minimum role: anyone who sees the space.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | From `list_download_items` |

## `create_download_item`

<span class="tool-kind tool-kind-write">Changes</span>

**Create an item.** Creates the item as a **draft**, with its product (Download kind, free, draft), returned in `product`. Then: upload the files with [`upload_download_file`](#upload-download-file), set the price with `update_product` and publish with [`update_download_item`](#update-download-item). *Role: whoever the space's Who can post allows; by default, the team (a member gets 403).*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` | id or link | Yes | |
| `title` | text | Yes | |
| `description` | Markdown | No | |
| `category_id` | id | No | From `get_downloads_space_settings` |
| `stamp_pdf` | true or false | No | Stamps the PDFs of whoever downloads (default: false). See [Stamp PDFs](/espacos/downloads#stamp-pdfs) |
| `image_url` or `image_base64` (+ `image_type`) | link or file | No | The cover: a link up to 10 MB, a file up to 5 MB. See [Images](/mcp/ferramentas#images) |

In a space in `single` mode, a second item is refused (409). Members' items wait for approval when the space requires it.

**Ask like this:** *"In the Materials space, create the item Cash flow spreadsheet, in the Spreadsheets category."*

## `update_download_item`

<span class="tool-kind tool-kind-write">Changes</span>

**Edit and publish.** Changes the title, description, category, `stamp_pdf`, the cover (`remove_cover` removes it) and the status (`status`: `draft` or `published`; publishing requires at least one file). Only what you send changes. *Role: the author and the team.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |
| `title`, `description`, `category_id`, `status`, `stamp_pdf` | | No | As in `create_download_item` |
| `remove_cover` | true | No | Removes the cover |
| `image_url` or `image_base64` (+ `image_type`) | link or file | No | The new cover |

**Ask like this:** *"Publish the Cash flow spreadsheet item and turn on the PDF stamp."*

## `delete_download_item`

<span class="tool-kind tool-kind-confirm">Asks to confirm</span>

**Delete the item.** Deletes the item and its files; its product is archived. It's refused (409) while a paid purchase still gives access: refund it first. *Role: the author and the team.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |

**Returns:** on the first call, the summary of what will be deleted and the confirmation code.

## `upload_download_file`

<span class="tool-kind tool-kind-write">Changes</span>

**Upload a file.** Adds a file to the item, by public **link** or by **base64**. It accepts images (PNG, JPG, WEBP, GIF), spreadsheets (XLS, XLSX, ODS, CSV), PDF, documents (DOC, DOCX, ODT, TXT, MD, PPT, PPTX) and ZIP, never executables; the name must keep its extension and the content must match the type (checked by the first bytes), just as in the browser. *Role: the author and the team.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |
| `file_url` | web address | No | The file's link. Up to **200 MB** |
| `file_base64` | text | No | The file in base64, up to about **7 MB**; above that, use the link |
| `mime_type` | text | No | E.g. `application/pdf`; optional when the link or the name tells |
| `name` | text | No | The name with the extension. Default: the link's |
| `replace_file_id` | id | No | The file this one replaces |

In `single` mode, the item keeps a single file: to upload again, pass `replace_file_id`. The storage usage notice only warns.

**Ask like this:** *"Upload https://exemplo.memberfy.net/fluxo.xlsx to the Cash flow spreadsheet item."*

## `remove_download_file`

<span class="tool-kind tool-kind-confirm">Asks to confirm</span>

**Remove a file.** The file is deleted and the storage comes back. If it was the last one of a published item, the item goes back to draft. *Role: the author and the team.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |
| `file_id` | id | Yes | From `get_download_item` |

## `reorder_download_files`

<span class="tool-kind tool-kind-write">Changes</span>

**Reorder the files.** `file_ids` is the complete list, from first to last. *Role: the author and the team.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |
| `file_ids` | list of ids | Yes | The new order |

## `get_download_url`

<span class="tool-kind tool-kind-read">Read-only</span>

**A file's link.** A link that works for **5 minutes**. Ask for it only when the person really wants the file; don't store or pass it on. The team and the author always get it; everyone else needs access (free item, active purchase or plan that includes the product; having downloaded it before isn't enough). *Minimum role: anyone who sees the space.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `file_id` | id | Yes | From `get_download_item` |

**Returns:** the link and `stamped`: `true` when it's the copy with the [stamp](/espacos/downloads#stamp-pdfs) (only for people outside the team), `false` when it's the original. Each member download counts toward the counters.

A paid item the person doesn't have returns `403`, with the price (the purchase is made in the app); a sold-out item returns `409`, and the assistant suggests [`join_waitlist`](/mcp/ferramentas-cursos#join-waitlist).

## `list_my_downloads`

<span class="tool-kind tool-kind-read">Read-only</span>

**Your downloads.** The items you can open, with where the access comes from (`purchase`, `plan`, `open`, `team`), your last download and, for a purchase, the date and the end of access. *Minimum role: any.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `page`, `limit` | numbers | No | Pagination |

## `get_download_stats`

<span class="tool-kind tool-kind-read">Read-only</span>

**The item's counters.** How many times each file was downloaded, in total and by distinct people. Only numbers, never who. *Minimum role: moderator (or finance).*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `item_id` | id | Yes | |

## Related

- [Downloads](/espacos/downloads)
- [Tools](/mcp/ferramentas)
- [Money and confirmation](/mcp/dinheiro-e-confirmacao)
