Tag Manager: List Triggers and Variables
gtm_list_triggers_variablesList the triggers and user-defined variables of one Google Tag Manager container's published version, or of a draft workspace when workspace names one. Each trigger comes with its type (page view, click, custom event, form submission, …), its conditions in words ("{{Page URL}} contains /thank-you") and the tags it fires; each variable with its type (data layer, constant, lookup table, JavaScript, …), its settings and the tags, triggers and variables that reference it. Use it to see what a tag's trigger actually tests or where a value comes from. Also lists the enabled built-in variables (Click URL, Page Path, …) by type, so a missing one can be enabled with gtm_enable_built_in_variables. Read-only.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gtm_list_triggers_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | Read the live version from Google again instead of the copy cached for ten minutes. Only needed right after the user published a change. Default false. | |
| include | No | both (default), triggers or variables. | |
| container | No | The container: its public id (GTM-XXXXXXX), its name, or its API path from gtm_list_containers. May be left out when the connected login reaches exactly one container. | |
| workspace | No | Read a draft workspace of the container (by name or id, as the user named it) instead of the published version: what the entities look like with that workspace's unpublished changes. Default: the published version. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | live (the published version) or workspace (a draft). | |
| complete | Yes | False when a list was cut off by paging; completenessNotes says which. | |
| publicId | No | Public GTM-XXXXXXX id of the container. | |
| triggers | Yes | Triggers, container order; empty when include=variables. | |
| fromCache | Yes | True when the live version came from the ten-minute cache rather than Google. | |
| variables | Yes | User-defined variables; empty when include=triggers. | |
| triggerCount | Yes | Triggers in the version or workspace read. | |
| containerName | Yes | The container's name. | |
| containerPath | Yes | API path of the container, accounts/{a}/containers/{c}. | |
| liveVersionId | No | Id of the published container version the answer describes. | |
| variableCount | Yes | User-defined variables in the version or workspace read. | |
| workspaceName | No | The workspace read, when scope is workspace. | |
| builtInVariables | Yes | Enabled built-in variables. | |
| completenessNotes | Yes | What the read did not cover, empty when complete. |