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

# Delete Variable

> Deletes a user-defined variable from a Google Tag Manager workspace

Deletes a user-defined variable from a Google Tag Manager workspace. Tags still referencing it will fail validation when creating a version. Note: GTM reports missing write access as 'resource not found', so if this fails on a variable that exists, the connected Google account needs Edit permission on the container (account-level Admin is not enough).

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

## 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 delete, or provide its variable ID. |

## Output

**Type**: `Dict`

Returns \{deleted: true, variableId} on success (the API returns an empty body).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.