> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# sirv

> Image CDN upload, management, and statistics

**Server path:** `/sirv` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                    | Description                                                                                                                                                                                            |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`sirv_upload_image`](#sirv_upload_image)               | Upload an image to Sirv CDN                                                                                                                                                                            |
| [`sirv_get_image_info`](#sirv_get_image_info)           | Get information about an image on Sirv                                                                                                                                                                 |
| [`sirv_list_files`](#sirv_list_files)                   | List files in Sirv account                                                                                                                                                                             |
| [`sirv_delete_file`](#sirv_delete_file)                 | Delete a file from Sirv                                                                                                                                                                                |
| [`sirv_get_stats`](#sirv_get_stats)                     | Get HTTP usage statistics for Sirv account                                                                                                                                                             |
| [`sirv_search_files`](#sirv_search_files)               | Search files in Sirv using Elasticsearch-style query (filename, basename, dirname, meta, size, dates)                                                                                                  |
| [`sirv_fetch_file`](#sirv_fetch_file)                   | Fetch a file from a URL and store it in Sirv                                                                                                                                                           |
| [`sirv_get_account`](#sirv_get_account)                 | Get Sirv account info (CDN URL, aliases, etc.)                                                                                                                                                         |
| [`sirv_get_account_storage`](#sirv_get_account_storage) | Get Sirv account storage usage                                                                                                                                                                         |
| [`sirv_download_file`](#sirv_download_file)             | Get the public URL to download a file from Sirv CDN. Sirv files are served at public URLs - no auth required. Returns downloadUrl for direct access. Use for images, PDFs, or any file stored in Sirv. |
| [`sirv_get_storage_stats`](#sirv_get_storage_stats)     | Get Sirv storage statistics                                                                                                                                                                            |

***

## sirv\_upload\_image

Upload an image to Sirv CDN

**Parameters:**

| Parameter      | Type    | Required | Default | Description                     |
| -------------- | ------- | -------- | ------- | ------------------------------- |
| `filename`     | string  | Yes      | —       | Filename for the uploaded image |
| `imageUrl`     | string  | No       | —       | URL of image to upload          |
| `imageContent` | string  | No       | —       | Base64 encoded image content    |
| `folder`       | string  | No       | —       | Folder path to upload to        |
| `overwrite`    | boolean | No       | `false` | Overwrite existing file         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "filename": {
        "type": "string",
        "description": "Filename for the uploaded image"
      },
      "imageUrl": {
        "type": "string",
        "description": "URL of image to upload"
      },
      "imageContent": {
        "type": "string",
        "description": "Base64 encoded image content"
      },
      "folder": {
        "type": "string",
        "description": "Folder path to upload to"
      },
      "overwrite": {
        "type": "boolean",
        "default": false,
        "description": "Overwrite existing file"
      }
    },
    "required": [
      "PCID",
      "filename"
    ]
  }
  ```
</Expandable>

***

## sirv\_get\_image\_info

Get information about an image on Sirv

**Parameters:**

| Parameter  | Type   | Required | Default | Description                    |
| ---------- | ------ | -------- | ------- | ------------------------------ |
| `filename` | string | Yes      | —       | Image filename to get info for |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "filename": {
        "type": "string",
        "description": "Image filename to get info for"
      }
    },
    "required": [
      "PCID",
      "filename"
    ]
  }
  ```
</Expandable>

***

## sirv\_list\_files

List files in Sirv account

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                                           |
| --------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------- |
| `dirname` | string | No       | `"/"`   | Directory to list (e.g. /Images, /). Root "/" is supported and lists top-level items. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "dirname": {
        "type": "string",
        "default": "/",
        "description": "Directory to list (e.g. /Images, /). Root \"/\" is supported and lists top-level items."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## sirv\_delete\_file

Delete a file from Sirv

**Parameters:**

| Parameter  | Type   | Required | Default | Description        |
| ---------- | ------ | -------- | ------- | ------------------ |
| `filename` | string | Yes      | —       | Filename to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "filename": {
        "type": "string",
        "description": "Filename to delete"
      }
    },
    "required": [
      "PCID",
      "filename"
    ]
  }
  ```
</Expandable>

***

## sirv\_get\_stats

Get HTTP usage statistics for Sirv account

**Parameters:**

| Parameter   | Type   | Required | Default | Description                       |
| ----------- | ------ | -------- | ------- | --------------------------------- |
| `startDate` | string | No       | —       | Start date for stats (YYYY-MM-DD) |
| `endDate`   | string | No       | —       | End date for stats (YYYY-MM-DD)   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "startDate": {
        "type": "string",
        "description": "Start date for stats (YYYY-MM-DD)"
      },
      "endDate": {
        "type": "string",
        "description": "End date for stats (YYYY-MM-DD)"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## sirv\_search\_files

Search files in Sirv using Elasticsearch-style query (filename, basename, dirname, meta, size, dates)

**Parameters:**

| Parameter | Type   | Required | Default | Description                               |
| --------- | ------ | -------- | ------- | ----------------------------------------- |
| `query`   | string | Yes      | —       | Search query (Elasticsearch syntax)       |
| `size`    | number | No       | `100`   | Max results to return                     |
| `from`    | number | No       | `0`     | Offset for pagination                     |
| `sort`    | object | No       | —       | Sort options, e.g. \{ "filename": "asc" } |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "query": {
        "type": "string",
        "description": "Search query (Elasticsearch syntax)"
      },
      "size": {
        "type": "number",
        "default": 100,
        "description": "Max results to return"
      },
      "from": {
        "type": "number",
        "default": 0,
        "description": "Offset for pagination"
      },
      "sort": {
        "type": "object",
        "additionalProperties": true,
        "description": "Sort options, e.g. { \"filename\": \"asc\" }"
      }
    },
    "required": [
      "PCID",
      "query"
    ]
  }
  ```
</Expandable>

***

## sirv\_fetch\_file

Fetch a file from a URL and store it in Sirv

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                      |
| ---------- | ------ | -------- | ------- | ------------------------------------------------ |
| `url`      | string | Yes      | —       | URL to fetch from                                |
| `filename` | string | Yes      | —       | Destination path in Sirv (e.g. /Images/file.jpg) |
| `auth`     | object | No       | —       | Basic auth if URL requires it                    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "url": {
        "type": "string",
        "description": "URL to fetch from"
      },
      "filename": {
        "type": "string",
        "description": "Destination path in Sirv (e.g. /Images/file.jpg)"
      },
      "auth": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "description": "Basic auth if URL requires it"
      }
    },
    "required": [
      "PCID",
      "url",
      "filename"
    ]
  }
  ```
</Expandable>

***

## sirv\_get\_account

Get Sirv account info (CDN URL, aliases, etc.)

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## sirv\_get\_account\_storage

Get Sirv account storage usage

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## sirv\_download\_file

Get the public URL to download a file from Sirv CDN. Sirv files are served at public URLs - no auth required. Returns downloadUrl for direct access. Use for images, PDFs, or any file stored in Sirv.

**Parameters:**

| Parameter  | Type   | Required | Default | Description                            |
| ---------- | ------ | -------- | ------- | -------------------------------------- |
| `filename` | string | Yes      | —       | Sirv file path (e.g. /Images/file.jpg) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "filename": {
        "type": "string",
        "description": "Sirv file path (e.g. /Images/file.jpg)"
      }
    },
    "required": [
      "PCID",
      "filename"
    ]
  }
  ```
</Expandable>

***

## sirv\_get\_storage\_stats

Get Sirv storage statistics

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>
