delete_variable
Remove a variable from a Google Tag Manager workspace draft after verifying no tags, triggers, or other variables reference it. Confirmation is required before deletion.
Instructions
Deletes a variable from the workspace draft.
Requires explicit confirmation: ask the user first, then call again with confirm=True. Check first that no tag, trigger or variable still references it as {{Variable Name}}. The removal stays in the workspace until a version is published.
Args: account_id: Numeric account ID or full resource path. container_id: Numeric container ID or full resource path. workspace_id: Numeric workspace ID; find it via list_workspaces. variable_id: Numeric variable ID; find it via list_variables. confirm: Must be True to actually delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| account_id | Yes | ||
| variable_id | Yes | ||
| container_id | Yes | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||