Tag Manager: List Containers
gtm_list_containersList 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
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | Ask Google again which containers the login reaches, for a container shared since connecting. Costs API quota; default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| containers | Yes | One entry per container. | |
| containerCount | Yes | Containers listed. | |
| accountsStillDiscovering | Yes | GTM accounts discovery has not read yet; 0 when the list is complete. |