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

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

No annotations are provided, so the description carries full burden. It states this is a retrieval operation ('取得します'), implying read-only behavior, but doesn't disclose any behavioral traits like pagination, rate limits, authentication requirements, error conditions, or what happens if the account doesn't exist. For a tool with zero annotation coverage, this is insufficient disclosure.

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 that directly states the tool's purpose. There's no wasted words or unnecessary elaboration. It's appropriately sized for a simple list operation and gets straight to the point.

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 list operation with no annotations and no output schema, the description is incomplete. It doesn't explain what the output contains (e.g., container metadata, pagination tokens), authentication requirements, error handling, or how it differs from other list operations. Given the lack of structured data, the description should provide more context about the tool's behavior and results.

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 the single parameter 'accountId' documented in the schema. The description doesn't add any parameter semantics beyond what's in the schema - it mentions '指定されたアカウント' (specified account) which corresponds to the accountId parameter, but provides no additional context about format, validation, or examples.

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 action ('取得します' - retrieves/gets) and resource ('コンテナ一覧' - container list) for a specified account. It distinguishes itself from siblings like 'get_container' (singular) and 'list_accounts' (different resource), but doesn't explicitly differentiate from other list operations like 'list_tags' or 'list_triggers' beyond the resource type.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (like authentication), nor does it differentiate from similar list operations for other resources. It simply states what the tool does without context about when it's appropriate.

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