Skip to main content
Glama
ambit1977

Google Tag Manager MCP Server

by ambit1977

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
NameRequiredDescriptionDefault
accountIdYesアカウントID
containerIdYesコンテナID
workspaceIdYesワークスペースID
tagIdYesタグID

Implementation Reference

  • 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
            ),
          },
        ],
      };
  • 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'],
      },
    },
  • 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 };
    }
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. 'タグを削除します' indicates a destructive mutation operation, but it doesn't disclose whether deletion is permanent/reversible, what permissions are required, whether it affects other entities, or what the response looks like. For a destructive operation with zero annotation coverage, this is a significant gap in behavioral transparency.

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

Conciseness4/5

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

The description is extremely concise - a single Japanese phrase that directly states the action. There's no wasted verbiage or unnecessary elaboration. However, this conciseness comes at the cost of completeness, as it provides minimal contextual information beyond the basic action.

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 destructive mutation tool with 4 required parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the deletion's consequences, required authentication state, error conditions, or what identifiers are needed. The agent would struggle to use this tool correctly without significant trial and error or external documentation.

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%, so all 4 parameters are documented in the schema itself (accountId, containerId, workspaceId, tagId). The description adds no additional parameter information beyond what's in the schema - it doesn't explain the hierarchical relationship between these IDs or provide usage examples. With complete schema coverage, the baseline score of 3 is appropriate.

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 'タグを削除します' (deletes a tag) clearly states the verb ('削除します' - delete) and resource ('タグ' - tag), which is better than a tautology. However, it doesn't differentiate from sibling tools like 'delete_trigger' or 'delete_variable' - it only states the generic action without specifying what makes tag deletion unique compared to other deletion operations in this system.

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. There's no mention of prerequisites (like needing authentication first), when deletion is appropriate versus updating a tag with 'update_tag', or what happens to associated resources when a tag is deleted. The agent must infer usage from the tool name alone.

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