> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/abilities/media.md).

# Media

Media abilities of the Hostinger AI plugin's WordPress site MCP server. Browse the media library, upload files from a URL, and edit or delete attachments.

Browse the media library, upload files from a URL, and edit or delete attachments.

**Available:** Always.

| Ability                                         | What it does                                                                                                          | Type                             |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| [Delete Media](#delete-media)                   | Permanently delete a media library item and its file; this cannot be undone.                                          | **Destructive** · Safe to retry  |
| [Get Media File](#get-media-file)               | Get the file content (blob) of a media library item.                                                                  | Read-only                        |
| [Get Media](#get-media)                         | Get one media library item by ID with its URL, sizes and metadata.                                                    | Read-only                        |
| [List Media](#list-media)                       | List media library items with pagination and filtering by type or date.                                               | Read-only                        |
| [Search Media](#search-media)                   | Search media library items by title, caption or description, with filtering.                                          | Read-only                        |
| [Update Media](#update-media)                   | Update the metadata of a media library item, such as its title, alt text or caption; only the fields you pass change. | Changes the site · Safe to retry |
| [Upload Media From URL](#upload-media-from-url) | Sideload a file from an external URL into the media library and return the new attachment.                            | Changes the site                 |

## Delete Media

`hostinger-ai/media-delete` · **Destructive** · Safe to retry

Permanently delete a media library item and its file; this cannot be undone.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Description sent to AI tools</summary>

> Permanently delete a media library item and its file; this cannot be undone. Use when asked to remove an image or file. Needs `id` from `hostinger-ai/media-search` or `hostinger-ai/media-list`.

</details>

## Get Media File

`hostinger-ai/media-file-get` · Read-only

Get the file content (blob) of a media library item.

| Required parameter | Type    | Description              |
| ------------------ | ------- | ------------------------ |
| `id`               | integer | The ID of the media item |

<details>

<summary>Optional parameters (1)</summary>

| Parameter | Type   | Description                                                                                                   |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| `size`    | string | Optional. The size of the image to retrieve (thumbnail, medium, large, full). Defaults to full/original size. |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Get the file content (blob) of a media library item. Use when you need to read or inspect the file itself, not just its metadata. Needs `id` from `hostinger-ai/media-search` or `hostinger-ai/media-list`.

</details>

## Get Media

`hostinger-ai/media-get` · Read-only

Get one media library item by ID with its URL, sizes and metadata.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Description sent to AI tools</summary>

> Get one media library item by ID with its URL, sizes and metadata. Use when you need the details of a known attachment. Needs `id` from `hostinger-ai/media-search` or `hostinger-ai/media-list`.

</details>

## List Media

`hostinger-ai/media-list` · Read-only

List media library items with pagination and filtering by type or date.

No required parameters.

<details>

<summary>Optional parameters (13)</summary>

| Parameter    | Type                                                                                                          | Default   | Description                                                                |
| ------------ | ------------------------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------- |
| `page`       | integer                                                                                                       | `1`       | Current page of the collection.                                            |
| `per_page`   | integer                                                                                                       | `10`      | Maximum number of items to be returned in result set.                      |
| `search`     | string                                                                                                        |           | Limit results to those matching a string.                                  |
| `author`     | array of integer                                                                                              | `[]`      | Limit result set to posts assigned to specific authors.                    |
| `exclude`    | array of integer                                                                                              | `[]`      | Ensure result set excludes specific IDs.                                   |
| `include`    | array of integer                                                                                              | `[]`      | Limit result set to specific IDs.                                          |
| `order`      | one of `asc`, `desc`                                                                                          | `desc`    | Order sort attribute ascending or descending.                              |
| `orderby`    | one of `author`, `date`, `id`, `include`, `modified`, `parent`, `relevance`, `slug`, `include_slugs`, `title` | `date`    | Sort collection by post attribute.                                         |
| `parent`     | array of integer                                                                                              | `[]`      | Limit result set to items with particular parent IDs.                      |
| `slug`       | array of string                                                                                               |           | Limit result set to posts with one or more specific slugs.                 |
| `status`     | array of `inherit`, `private`, `trash`                                                                        | `inherit` | Limit result set to posts assigned one or more statuses.                   |
| `media_type` | array of `image`, `video`, `text`, `application`, `audio`                                                     |           | Limit result set to attachments of a particular media type or media types. |
| `mime_type`  | array of string                                                                                               |           | Limit result set to attachments of a particular MIME type or MIME types.   |

</details>

<details>

<summary>Description sent to AI tools</summary>

> List media library items with pagination and filtering by type or date. Use when you need an attachment ID and want to browse the library; to find an item by words use `hostinger-ai/media-search`.

</details>

## Search Media

`hostinger-ai/media-search` · Read-only

Search media library items by title, caption or description, with filtering.

No required parameters.

<details>

<summary>Optional parameters (7)</summary>

| Parameter    | Type    | Default | Description                                                         |
| ------------ | ------- | ------- | ------------------------------------------------------------------- |
| `search`     | string  |         | Search term to look for in media titles, captions, and descriptions |
| `media_type` | string  |         | Filter by media type (image, video, audio, application)             |
| `mime_type`  | string  |         | Filter by MIME type (e.g., image/jpeg, video/mp4)                   |
| `author`     | integer |         | Filter by author ID                                                 |
| `parent`     | integer |         | Filter by parent post ID                                            |
| `page`       | integer | `1`     | Page number for pagination                                          |
| `per_page`   | integer | `10`    | Number of items per page                                            |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Search media library items by title, caption or description, with filtering. Use when you need the attachment ID of an existing image or file, for example for a featured image.

</details>

## Update Media

`hostinger-ai/media-update` · Changes the site · Safe to retry

Update the metadata of a media library item, such as its title, alt text or caption; only the fields you pass change.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Optional parameters (12)</summary>

| Parameter        | Type                                                                                                                                                                                                             | Description                                                   |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| `slug`           | string                                                                                                                                                                                                           | An alphanumeric identifier for the post unique to its type.   |
| `status`         | one of `publish`, `future`, `draft`, `pending`, `private`, `in-progress`, `failed`, `wc-pending`, `wc-processing`, `wc-on-hold`, `wc-completed`, `wc-cancelled`, `wc-refunded`, `wc-failed`, `wc-checkout-draft` | A named status for the post.                                  |
| `title`          | string or object                                                                                                                                                                                                 | The title for the post.                                       |
| `author`         | integer                                                                                                                                                                                                          | The ID for the author of the post.                            |
| `featured_media` | integer                                                                                                                                                                                                          | The ID of the featured media for the post.                    |
| `comment_status` | one of `open`, `closed`                                                                                                                                                                                          | Whether or not comments are open on the post.                 |
| `ping_status`    | one of `open`, `closed`                                                                                                                                                                                          | Whether or not the post can be pinged.                        |
| `template`       | string                                                                                                                                                                                                           | The theme file to use to display the post.                    |
| `alt_text`       | string                                                                                                                                                                                                           | Alternative text to display when attachment is not displayed. |
| `caption`        | string or object                                                                                                                                                                                                 | The attachment caption.                                       |
| `description`    | string or object                                                                                                                                                                                                 | The attachment description.                                   |
| `post`           | integer                                                                                                                                                                                                          | The ID for the associated post of the attachment.             |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Update the metadata of a media library item, such as its title, alt text or caption; only the fields you pass change. Use when asked to fix the alt text, title or caption of an image or file. Needs `id` from `hostinger-ai/media-search` or `hostinger-ai/media-list`.

</details>

## Upload Media From URL

`hostinger-ai/media-upload-from-url` · Changes the site

Sideload a file from an external URL into the media library and return the new attachment.

| Required parameter | Type   | Description                                                            |
| ------------------ | ------ | ---------------------------------------------------------------------- |
| `url`              | string | Publicly reachable URL of the file to sideload into the media library. |

<details>

<summary>Optional parameters (6)</summary>

| Parameter     | Type    | Description                                                                                               |
| ------------- | ------- | --------------------------------------------------------------------------------------------------------- |
| `filename`    | string  | Optional. File name to store the file under, including extension. Defaults to the file name from the URL. |
| `title`       | string  | Optional. Attachment title.                                                                               |
| `caption`     | string  | Optional. Attachment caption.                                                                             |
| `description` | string  | Optional. Attachment description.                                                                         |
| `alt_text`    | string  | Optional. Alternative text for images. Recommended for accessibility and SEO.                             |
| `post_id`     | integer | Optional. ID of the post the attachment should be attached to.                                            |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Sideload a file from an external URL into the media library and return the new attachment. Use when content needs an image or file from the web, such as a featured image or an image inside a post or Elementor widget. Any publicly reachable direct file URL is acceptable, including stock photo CDNs - the file is downloaded and stored locally, so the attachment never depends on the external URL staying alive. The url must point at the file itself and return HTTP 200 with a file content type, not at a web page containing the image.

</details>

## Related

* [Abilities Reference](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/abilities.md)
* [WordPress Site MCP Server](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/mcp-server.md)
