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;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('取得します'), but doesn't cover other important aspects like whether it requires authentication, what happens if the container doesn't exist, rate limits, or the format of returned details. For a tool with zero annotation coverage, this is insufficient.

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

Conciseness5/5

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

The description is a single, efficient sentence in Japanese that directly states the tool's purpose without any unnecessary words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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

Completeness2/5

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

For a retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what '詳細' (details) includes, whether authentication is required, error conditions, or how this differs from sibling list operations. The context signals show this is a simple tool, but more behavioral context would be helpful.

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%, with both parameters (accountId and containerId) clearly documented in the schema. The description adds no additional parameter information beyond what the schema provides, which is acceptable given the high coverage, resulting in the baseline score of 3.

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

Purpose4/5

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

The description clearly states the verb ('取得します' - get/retrieve) and resource ('指定されたコンテナの詳細' - details of the specified container), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_containers' or 'get_workspace', which would require a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'list_containers' (for listing multiple containers) or 'get_workspace' (for workspace details). It also doesn't mention prerequisites such as authentication or account access, which are implied by the required accountId parameter.

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

Install Server

Other Tools

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