Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: List Containers

gtm_list_containers
Read-onlyIdempotent

List the Google Tag Manager containers the user's connected Google login can read, with each container's public id (GTM-XXXXXXX), name and account. Call this first when the user has more than one site: the other gtm_* tools take one of these containers. Answers from the stored list; on a login with many accounts the list may still be filling in the background and the answer says how many accounts are left to read. Pass refresh=true after the login was granted a new container. 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_containers"
  }
}

Input Schema

NameRequiredDescriptionDefault
refreshNoAsk Google again which containers the login reaches, for a container shared since connecting. Costs API quota; default false.

Output Schema

NameRequiredDescriptionDefault
containersYesOne entry per container.
containerCountYesContainers listed.
accountsStillDiscoveringYesGTM accounts discovery has not read yet; 0 when the list is complete.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered; the description nonetheless adds genuinely non-obvious behavior — the answer comes from a stored list and may still be filling in when the login has many accounts, with a count of accounts remaining. The only weakness is that the trailing 'Read-only' merely restates the annotation.

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?

Front-loaded with the purpose, then use-case routing, then the caching caveat, then the parameter hint — a logical order with no filler. The closing 'Read-only' is redundant with the annotation and could be dropped, keeping it just short of ideal.

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?

Return values need not be explained because an output schema exists, yet the description still summarizes what each entry carries and warns that a multi-account list may be incomplete with a remaining-account count. For a single-parameter, read-only listing tool this covers everything an agent needs to call it and interpret the result.

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

Parameters4/5

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

The sole parameter is fully documented in the schema (including quota cost and default false), so baseline is 3; the description goes beyond it by naming the trigger condition — pass refresh=true after the login was granted a new container shared since connecting. That is actionable guidance the schema does not supply.

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 (list Google Tag Manager containers), scopes it to what the connected login can read, and names the returned fields (public id GTM-XXXXXXX, name, account). This is clearly distinguishable from gtm_list_tags, gtm_list_workspaces and other sibling list tools.

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?

Explicitly routes the agent: 'Call this first when the user has more than one site: the other gtm_* tools take one of these containers,' which establishes the dependency ordering with the sibling family. It also gives the condition for refresh=true (after the login was granted a new container), covering both the default and the override path.

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