delete_tag
Remove tags from Google Tag Manager to clean up configurations, eliminate tracking issues, or update website analytics setups.
Instructions
タグを削除します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | アカウントID | |
| containerId | Yes | コンテナID | |
| workspaceId | Yes | ワークスペースID | |
| tagId | Yes | タグID |
Implementation Reference
- src/index.js:1125-1143 (handler)MCP CallToolRequest handler for 'delete_tag' tool. Calls GTMClient.deleteTag with provided arguments and returns JSON response.case 'delete_tag': return { content: [ { type: 'text', text: JSON.stringify( await this.gtmClient.deleteTag( args.accountId, args.containerId, args.workspaceId, args.tagId ), null, 2 ), }, ], };
- src/index.js:332-356 (schema)Tool schema definition for 'delete_tag' including input parameters (accountId, containerId, workspaceId, tagId). Listed in ListToolsRequest response.name: 'delete_tag', description: 'タグを削除します', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'アカウントID', }, containerId: { type: 'string', description: 'コンテナID', }, workspaceId: { type: 'string', description: 'ワークスペースID', }, tagId: { type: 'string', description: 'タグID', }, }, required: ['accountId', 'containerId', 'workspaceId', 'tagId'], }, },
- src/gtm-client.js:184-190 (helper)GTMClient method implementing the tag deletion using Google Tag Manager API.async deleteTag(accountId, containerId, workspaceId, tagId) { await this.ensureAuth(); await this.tagmanager.accounts.containers.workspaces.tags.delete({ path: `accounts/${accountId}/containers/${containerId}/workspaces/${workspaceId}/tags/${tagId}` }); return { success: true }; }