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
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | アカウントID | |
| containerId | Yes | コンテナID | |
| workspaceId | Yes | ワークスペースID | |
| triggerId | Yes | トリガーID |
Implementation Reference
- src/index.js:1430-1447 (handler)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 ), }, ], };
- src/index.js:379-403 (schema)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'], },
- src/gtm-client.js:229-235 (helper)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; }