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

# Get Variable

> Fetches a single variable from a Google Tag Manager workspace with its full configuration

Fetches a single variable from a Google Tag Manager workspace with its full configuration. Use before gtm\_update\_variable in the get, edit, update workflow.

|                      |                    |
| -------------------- | ------------------ |
| **App**              | Google Tag Manager |
| **Operation ID**     | `gtm_get_variable` |
| **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.                                     |
| `variable`  | DynamicAccount | Yes      | -       | Select the variable to fetch, or provide its variable ID. |

## Output

**Type**: `Dict`

Returns the variable as provided by the Tag Manager API.
