Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: Get Container

gtm_get_container
Read-onlyIdempotent

Summarise 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

NameRequiredDescriptionDefault
freshNoRead 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.
containerNoThe 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

NameRequiredDescriptionDefault
publicIdNoPublic GTM-XXXXXXX id of the container.
tagCountYesTags in the live version.
tagKindsYesTags per kind: GOOGLE_ADS_CONVERSION, GA4_EVENT, GOOGLE_TAG, CUSTOM_HTML, COMMUNITY_TEMPLATE, …
fromCacheYesTrue when the live version came from the ten-minute cache rather than Google.
zoneCountYesZones.
clientCountYesClients (server containers).
domainNamesYesDomains the container is declared for.
folderCountYesFolders.
triggerCountYesTriggers.
containerNameYesThe container's name.
containerPathYesAPI path of the container, accounts/{a}/containers/{c}.
liveVersionIdNoId of the published container version the answer describes.
tagManagerUrlNoLink to the version in the Tag Manager UI.
usageContextsYesweb, server, android, ios, amp.
variableCountYesUser-defined variables.
pausedTagCountYesOf which paused.
liveVersionNameNoName the publisher gave the live version.
marketingTagCountYesTags that send to an advertising platform.
taggingServerUrlsYesServer-side tagging URLs, for a server container.
customTemplateCountYesCustom or community templates.
builtInVariableCountYesBuilt-in variables enabled.
liveVersionDescriptionNoIts description, usually the change note.
marketingTagsWithConsentSettingYesOf which have a consent setting other than "not set".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is not the description's burden. The description still adds real value by scoping the read to the published/live version rather than the workspace draft — a distinction the annotations cannot express — and by implying the summary is aggregated rather than raw entity data. It does not discuss caching in prose, but the schema's 'fresh' parameter already documents that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence that front-loads the core verb and resource, then a short routing sentence. The parenthetical enumerations ('web, server, iOS, Android, AMP' and the tag-kind list) are long but each item tells the agent what will be returned, so they largely earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value shape need not be restated. The description tells the agent what the summary covers, which version it reads, and where to go next — everything needed to decide whether to call it and how to interpret a first-orientation step.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters carry their own explanatory text, including the ten-minute cache and the optional container identification. The description adds nothing about parameter usage beyond the implicit 'live version' framing, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Summarise one Google Tag Manager container's published (live) version') and then enumerates exactly what the summary contains: version id/name, domains and platform, entity counts, paused tags, tag kinds, consent coverage. It is clearly distinguishable from gtm_list_tags and gtm_audit_tracking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit ordering guidance ('Use it first to orient') and names the two siblings that go deeper, so the agent knows both the entry point and the escalation path. The read-only framing also rules out use as a mutation step.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources