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

# List Versions

> Lists container versions in a Google Tag Manager container with tag, trigger, and variable counts

Lists container versions in a Google Tag Manager container with tag, trigger, and variable counts. Optionally includes deleted versions. Supports filtering by name or version ID.

|                      |                     |
| -------------------- | ------------------- |
| **App**              | Google Tag Manager  |
| **Operation ID**     | `gtm_list_versions` |
| **Type**             | Action              |
| **Connection**       | `gtm` (required)    |
| **Credits per run**  | 1                   |
| **Agent / MCP tool** | Yes                 |

## Inputs

| Field             | Type                | Required | Default | Description                                                                                                                                                                                                                                                                                    |
| ----------------- | ------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`         | DynamicAccount      | Yes      | -       | Select the Google Tag Manager account.                                                                                                                                                                                                                                                         |
| `container`       | DynamicAccount      | Yes      | -       | Select the container whose versions should be listed.                                                                                                                                                                                                                                          |
| `include_deleted` | boolean             | No       | `False` | Also include deleted (unpublished) versions when listing.                                                                                                                                                                                                                                      |
| `filters`         | array of FilterItem | No       | -       | Optional filters to apply when retrieving versions. The available fields to filter by are: - containerVersionId: Filter by version ID - name: Filter by version name Filters are combined using AND logic. If you want to use OR logic, use relevant operators like REGEXP\_MATCH or IN\_LIST. |
| `limit`           | integer             | No       | `100`   | Maximum number of versions to return. Default: 100.                                                                                                                                                                                                                                            |

### FilterItem

| Field      | Type                       | Required | Default | Description                                                                                                                                                   |
| ---------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `field`    | string or SelectableOption | Yes      | -       | The field to filter on, must be one of the current selected metrics or dimensions.                                                                            |
| `operator` | string                     | Yes      | -       | The operator to use for filtering. Must be one of the supported values. Use REGEXP\_MATCH to search/filter by multiple OR values like '.*(summer\|holiday).*' |
| `value`    | string                     | Yes      | -       | The value to filter by. Can be a string, number, regex, or a list of strings.                                                                                 |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `List[Dict]`

Returns the raw list of GTM container version headers as provided by the Tag Manager API.
