Skip to main content
Glama
ambit1977

Google Tag Manager MCP Server

by ambit1977

list_containers

Retrieve a list of containers for a specified Google Tag Manager account to manage tags, triggers, and variables.

Instructions

指定されたアカウントのコンテナ一覧を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesアカウントID

Implementation Reference

  • MCP tool handler for 'list_containers'. Calls GTMClient.listContainers with the accountId argument and returns the JSON-formatted result.
    case 'list_containers': return { content: [ { type: 'text', text: JSON.stringify( await this.gtmClient.listContainers(args.accountId), null, 2 ), }, ], };
  • src/index.js:82-95 (registration)
    Registration of the 'list_containers' tool in the ListTools response, including name, description, and input schema.
    { name: 'list_containers', description: '指定されたアカウントのコンテナ一覧を取得します', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'アカウントID', }, }, required: ['accountId'], }, },
  • Input schema for the 'list_containers' tool defining the required accountId parameter.
    inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'アカウントID', }, }, required: ['accountId'], },
  • Core implementation of listContainers in GTMClient class, which authenticates and calls Google Tag Manager API to list containers for the given account.
    async listContainers(accountId) { await this.ensureAuth(); const response = await this.tagmanager.accounts.containers.list({ parent: `accounts/${accountId}` }); return response.data.container || []; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ambit1977/GTM-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server