Skip to main content
Glama
ambit1977

Google Tag Manager MCP Server

by ambit1977

get_trigger

Retrieve detailed configuration information for a specific trigger in Google Tag Manager, including its settings and activation conditions.

Instructions

指定されたトリガーの詳細を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesアカウントID
containerIdYesコンテナID
workspaceIdYesワークスペースID
triggerIdYesトリガーID

Implementation Reference

  • The handler function for the 'get_trigger' MCP tool. It extracts parameters from the request, calls gtmClient.getTrigger, stringifies the result as JSON, and returns it as text content.
    case 'get_trigger':
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              await this.gtmClient.getTrigger(
                args.accountId,
                args.containerId,
                args.workspaceId,
                args.triggerId
              ),
              null,
              2
            ),
          },
        ],
      };
  • The schema definition for the 'get_trigger' tool, including name, description, and input schema requiring accountId, containerId, workspaceId, and triggerId.
    {
      name: 'get_trigger',
      description: '指定されたトリガーの詳細を取得します',
      inputSchema: {
        type: 'object',
        properties: {
          accountId: {
            type: 'string',
            description: 'アカウントID',
          },
          containerId: {
            type: 'string',
            description: 'コンテナID',
          },
          workspaceId: {
            type: 'string',
            description: 'ワークスペースID',
          },
          triggerId: {
            type: 'string',
            description: 'トリガーID',
          },
        },
        required: ['accountId', 'containerId', 'workspaceId', 'triggerId'],
      },
  • The core helper method in GTMClient that performs the actual API call to retrieve trigger details using the Google Tag Manager API.
    async getTrigger(accountId, containerId, workspaceId, triggerId) {
      await this.ensureAuth();
      const response = await this.tagmanager.accounts.containers.workspaces.triggers.get({
        path: `accounts/${accountId}/containers/${containerId}/workspaces/${workspaceId}/triggers/${triggerId}`
      });
      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 implies a read-only operation but doesn't specify if it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with four required parameters and no annotation coverage, this leaves significant behavioral gaps.

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 unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

Given the tool's complexity (four required IDs, no output schema, no annotations), the description is insufficient. It doesn't explain what 'details' include, how to obtain the required IDs, or the expected return format. For a retrieval tool in a system with authentication and multiple entities, more context is needed.

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 all four parameters documented in the schema. The description adds no additional parameter semantics beyond implying that 'triggerId' identifies the target, which is already clear from the schema. This meets the baseline for high schema coverage.

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

Purpose3/5

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

The description '指定されたトリガーの詳細を取得します' (Get details of the specified trigger) clearly states the verb '取得' (get) and resource 'トリガー' (trigger), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_triggers' or 'update_trigger', which would require more specificity about scope or granularity.

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. It doesn't mention prerequisites like authentication, distinguish it from 'list_triggers' for bulk retrieval, or indicate that it's for fetching a single trigger by ID rather than creating or updating one.

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