Tag Manager: Get Container
gtm_get_containerSummarise one Google Tag Manager container's published (live) version: the version id and name, the domains and platform it serves (web, server, iOS, Android, AMP), how many tags, triggers, variables, templates and clients it holds, how many tags are paused, the tags by kind (Google Ads conversion, GA4, Google tag, custom HTML, community template, …) and how many marketing tags carry a consent setting. Use it first to orient; gtm_list_tags and gtm_audit_tracking go deeper. 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_get_container"
}
}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. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| publicId | No | Public GTM-XXXXXXX id of the container. | |
| tagCount | Yes | Tags in the live version. | |
| tagKinds | Yes | Tags per kind: GOOGLE_ADS_CONVERSION, GA4_EVENT, GOOGLE_TAG, CUSTOM_HTML, COMMUNITY_TEMPLATE, … | |
| fromCache | Yes | True when the live version came from the ten-minute cache rather than Google. | |
| zoneCount | Yes | Zones. | |
| clientCount | Yes | Clients (server containers). | |
| domainNames | Yes | Domains the container is declared for. | |
| folderCount | Yes | Folders. | |
| triggerCount | Yes | Triggers. | |
| 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. | |
| tagManagerUrl | No | Link to the version in the Tag Manager UI. | |
| usageContexts | Yes | web, server, android, ios, amp. | |
| variableCount | Yes | User-defined variables. | |
| pausedTagCount | Yes | Of which paused. | |
| liveVersionName | No | Name the publisher gave the live version. | |
| marketingTagCount | Yes | Tags that send to an advertising platform. | |
| taggingServerUrls | Yes | Server-side tagging URLs, for a server container. | |
| customTemplateCount | Yes | Custom or community templates. | |
| builtInVariableCount | Yes | Built-in variables enabled. | |
| liveVersionDescription | No | Its description, usually the change note. | |
| marketingTagsWithConsentSetting | Yes | Of which have a consent setting other than "not set". |