> ## 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 Variables

> Lists user-defined variables in a Google Tag Manager workspace with type and parameters

Lists user-defined variables in a Google Tag Manager workspace with type and parameters. Supports filtering by name, variable ID, or variable type.

|                      |                      |
| -------------------- | -------------------- |
| **App**              | Google Tag Manager   |
| **Operation ID**     | `gtm_list_variables` |
| **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.                                                                                                                                                                                                                                                                                                                      |
| `workspace` | DynamicAccount      | Yes      | -       | Select the workspace whose variables should be listed.                                                                                                                                                                                                                                                                                     |
| `filters`   | array of FilterItem | No       | -       | Optional filters to apply when retrieving variables. The available fields to filter by are: - variableId: Filter by variable ID - name: Filter by variable name - type: Filter by variable type (e.g. v, c, jsm) 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 variables 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 variables as provided by the Tag Manager API.
