Skip to main content
Glama
ambit1977

Google Tag Manager MCP Server

by ambit1977

get_container

Retrieve detailed information about a specific Google Tag Manager container by providing account and container IDs to access configuration data.

Instructions

指定されたコンテナの詳細を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesアカウントID
containerIdYesコンテナID

Implementation Reference

  • MCP server handler for 'get_container' tool: extracts arguments, calls GTMClient.getContainer, and returns JSON response.
    case 'get_container':
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              await this.gtmClient.getContainer(args.accountId, args.containerId),
              null,
              2
            ),
          },
        ],
      };
  • Input schema definition for the 'get_container' tool, specifying required accountId and containerId parameters.
    inputSchema: {
      type: 'object',
      properties: {
        accountId: {
          type: 'string',
          description: 'アカウントID',
        },
        containerId: {
          type: 'string',
          description: 'コンテナID',
        },
      },
      required: ['accountId', 'containerId'],
    },
  • src/index.js:96-113 (registration)
    Tool registration in ListTools response, including name, description, and input schema.
    {
      name: 'get_container',
      description: '指定されたコンテナの詳細を取得します',
      inputSchema: {
        type: 'object',
        properties: {
          accountId: {
            type: 'string',
            description: 'アカウントID',
          },
          containerId: {
            type: 'string',
            description: 'コンテナID',
          },
        },
        required: ['accountId', 'containerId'],
      },
    },
  • Core implementation: authenticates and calls Google Tag Manager API to retrieve container details.
    async getContainer(accountId, containerId) {
      await this.ensureAuth();
      const response = await this.tagmanager.accounts.containers.get({
        path: `accounts/${accountId}/containers/${containerId}`
      });
      return response.data;
    }

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