Skip to main content
Glama
jarnielcataluna

gtm-tag-architect

gtm-tag-architect

Google Antigravity 및 Claude Code용 공개 프로덕션 준비 플러그인으로, MCP를 통해 Google Tag Manager에 연결합니다.

개발자/마케터에게 사이트에 대해 인터뷰하고, 컨테이너 결함(중복, 누락된 트리거, Consent Mode v2 위반)을 진단하며, 최적화된 추적 분류 체계와 dataLayer 계약을 생성하는 대화형 /setup 명령을 제공합니다.


기능

  • /setup 대화형 명령: 3단계 인터뷰 및 감사 워크플로를 안내합니다.

  • 심층 컨테이너 진단: 중복 GA4/Meta 태그, 고아 트리거, 동의되지 않은 마케팅 픽셀, 렌더링 차단 스크립트를 감사합니다.

  • 자동 수정: 태그를 중복 제거하고 모든 태그에 Google Consent Mode v2를 적용합니다.

  • 업계 추적 매트릭스: E-Commerce, SaaS/PLG, B2B Lead Gen을 위한 사전 구축된 분류 런북.

  • 개발자용 dataLayer.d.ts 생성기: React, Next.js, vanilla 앱용 타입이 지정된 이벤트 계약과 헬퍼 push 함수를 생성합니다.

  • 듀얼 모드 MCP 서버: Google Tag Manager REST API v2에 대해 라이브로 실행되거나 로컬로 내보낸 컨테이너 JSON 파일을 오프라인으로 감사합니다.


Related MCP server: mcp-gtm-ga4

설치 및 설정

Google Antigravity용

이 저장소를 워크스페이스 또는 전역 사용자 지정 디렉터리에 클론하거나 배치하세요:

# In your project's .agents/plugins/ or ~/.gemini/config/plugins/
git clone https://github.com/jarnielcataluna/gtm-tag-architect.git

Antigravity는 플러그인을 자동으로 발견하고 /setup 슬래시 명령을 노출하며 mcp_config.json에 정의된 MCP 서버를 등록합니다.

Claude Code / 독립형 MCP용

claude_desktop_config.json 또는 프로젝트 MCP 설정에 서버를 등록하세요:

{
  "mcpServers": {
    "gtm-tag-architect": {
      "command": "node",
      "args": ["/path/to/gtm-tag-architect/bin/gtm-mcp.js"]
    }
  }
}

사용법

/setup 명령 실행

Antigravity 또는 Claude Code 내에서:

/setup

에이전트가 다음에 대해 인터뷰합니다:

  1. 사이트 유형 및 업종 (E-Commerce, SaaS, Lead Gen, Content)

  2. 필요한 픽셀 (GA4, Meta, LinkedIn, Google Ads, PostHog)

  3. 개인정보 보호 요구 사항 (GDPR / Consent Mode v2)

그런 다음 진단 감사를 수행하고 결함 수정, 동의 규칙 적용, 또는 깨끗한 dataLayer.d.ts 내보내기를 위한 작업 메뉴를 제시합니다.


테스트 및 로컬 감사

포함된 테스트 픽스처를 대상으로 오프라인 진단 테스트 하네스를 실행할 수 있습니다:

npm install
npm run audit-fixture

라이선스

MIT

Available Tools

5 tools
gtm_add_tag_recipeB

Adds a pre-configured tag recipe (GA4 Core, Meta Pixel, PostHog, or LinkedIn) to the container workspace.

ParametersJSON Schema
NameRequiredDescriptionDefault
recipeYes
pixelIdNo
containerPathNo
measurementIdNo

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the basic action ('adds... to the container workspace') but does not disclose whether the operation requires special permissions, what happens if the recipe or a matching tag already exists (idempotency/duplication risk), whether recipes create multiple underlying resources, or what the response contains.

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?

A single sentence that front-loads the operation and packs the recipe enumeration into a parenthetical. No filler or redundant phrasing; it earns its length though the parenthetical list is slightly dense.

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 tool with 4 parameters, no annotations, and no output schema, one sentence is insufficient. The description does not clarify which parameters apply to which recipes, how the container workspace is selected (given containerPath is optional), or what a successful result looks like. These are meaningful gaps for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for parameter meaning. It adds value only for the 'recipe' parameter by humanizing the enum values. It leaves pixelId, containerPath, and measurementId unexplained, and the phrase 'pre-configured' actively creates confusion by implying no configuration is needed while three optional config parameters exist.

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

Purpose5/5

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

The description uses a specific verb+resource structure ('Adds a pre-configured tag recipe') and enumerates the exact recipe types (GA4 Core, Meta Pixel, PostHog, LinkedIn), making the tool's function immediately clear. The action of adding is clearly distinct from the sibling tools' operations (audit, deduplicate, apply consent mode, generate types).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied by the purpose statement: use this when you want to add a standard pre-configured tag rather than building one manually. However, there is no explicit when-to-use vs when-not-to-use guidance, no mention of alternatives (e.g., manual tag creation), and no note about which recipe fits which scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gtm_audit_containerA

Runs a deep diagnostic audit on a Google Tag Manager container. Identifies duplicate tags, missing triggers, unconsented tracking (Consent Mode v2), and heavy blocking scripts.

ParametersJSON Schema
NameRequiredDescriptionDefault
containerPathNoOptional local path to container export JSON file

TDQS

A3.9/5.0
Behavior3/5

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

The term 'audit' implies a read-only operation, but the description does not explicitly state that no modifications are made. Since no annotations are provided, the description carries the burden, and while it suggests non-destructive behavior, it is not fully explicit about side effects.

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 highly concise, consisting of two short sentences that efficiently convey the tool's purpose and key output categories. No unnecessary words or repetition are present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lists specific issues the audit identifies, giving context about what the tool returns. However, it does not specify the output format (e.g., report, list, JSON), which would enhance completeness given the lack of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter containerPath is clearly described as 'Optional local path to container export JSON file', providing precise meaning about its type and purpose. This fully covers the schema, leaving no ambiguity.

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

Purpose5/5

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

The description clearly states the tool's function with a specific verb ('Runs') and resource ('Google Tag Manager container'), and lists concrete outputs (duplicate tags, missing triggers, unconsented tracking, heavy blocking scripts). This distinguishes it from sibling tools like gtm_deduplicate_tags or gtm_apply_consent_mode.

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 does not provide explicit guidance on when to use this tool versus alternatives. It only describes what the tool does, without stating scenarios where it is preferred over other GTM utilities, making it less helpful for usage decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gtm_deduplicate_tagsA

Deduplicates GA4 configuration and Meta Pixel tags in the GTM container, consolidating firing triggers and pruning duplicate base tags.

ParametersJSON Schema
NameRequiredDescriptionDefault
containerPathNoPath to container JSON file

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It indicates a mutating action ('pruning', 'deduplicating') but does not explicitly state that the container file is modified, whether the operation is reversible, or any side effects. The agent is not warned that this may be destructive or that the original file is overwritten. This is insufficient for a mutation tool without annotation support.

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, well-formed sentence that front-loads the primary action and immediately states what it does. It contains no filler, repetition, or wasted words, making it highly concise and structured effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (one parameter with full schema coverage, no output schema, no annotations), the description is adequate but incomplete. It does not explain what the tool returns (if anything), nor does it mention whether it modifies the container file in place or how to handle potential side effects. Since no annotations exist, the description should cover these aspects more explicitly; it currently leaves the agent guessing about post-condition behavior.

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?

The schema provides 100% description coverage for the only parameter, containerPath, with its description ('Path to container JSON file'). The tool description adds no additional meaning about the parameter. Since schema coverage is high, the baseline of 3 applies; the description offers no extra value on parameter semantics.

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

Purpose5/5

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

The description clearly identifies the tool's function: deduplicating GA4 configuration and Meta Pixel tags in the GTM container. It specifies the action (deduplicate), the resource (GA4 and Meta Pixel tags in GTM container), and the method (consolidating firing triggers and pruning duplicate base tags). This clearly distinguishes it from siblings like gtm_audit_container (auditing) or gtm_add_tag_recipe (adding tags).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when dealing with duplicate tags, but it does not explicitly state when to use this tool versus alternatives or provide any exclusions. There is no mention of prerequisites (e.g., having a container file) or when not to use it. The purpose is clear, but the guidance on when to invoke it is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gtm_generate_datalayer_typesA

Generates production TypeScript type definitions and helper push functions for developers (E-commerce, SaaS, or Lead Gen).

ParametersJSON Schema
NameRequiredDescriptionDefault
industryYesTarget industry tracking taxonomy

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description must disclose behavior. It states it generates types and helper functions, which is a clear action, but it does not disclose side effects (e.g., whether files are written to a repository, whether it affects existing code, or any authorization requirements). This is a moderate gap for a generation tool.

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 one concise sentence, front-loaded with the core function (generates production TypeScript type definitions and helper push functions) and adds target users and use cases. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With one parameter fully described in schema and no output schema, the description is adequate for a simple tool. However, it does not mention what the generated output looks like (though no output schema is needed), nor does it clarify the relationship to the 'content' industry enum value, which is listed in schema but not in the description. It is complete enough for basic use but could be enhanced.

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?

The input schema has 100% coverage for the single parameter 'industry' with an enum description 'Target industry tracking taxonomy'. The description adds context by listing example industries (E-commerce, SaaS, Lead Gen) within the main description, which clarifies the parameter options, but this is redundant with the enum. The description does not add significant meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool generates TypeScript type definitions and helper push functions, specifying the target use case (E-commerce, SaaS, or Lead Gen). The verb 'generate' and resource 'datalayer types' are specific, and it is distinct from sibling tools that perform auditing, deduplication, consent mode, and tag recipe actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (for developers, targeted at specific industries) but does not explicitly state when to use this tool vs alternatives. Sibling tools have different purposes, so a developer would infer usage, but there is no direct guidance on prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedgtm_add_tag_recipe
    • First observedgtm_apply_consent_mode
    • First observedgtm_audit_container
    • First observedgtm_deduplicate_tags
    • First observedgtm_generate_datalayer_types

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation4/5

Each tool targets a distinct action in the GTM workflow—audit, deduplicate, apply consent, add recipe, generate types—so an agent can usually pick the right one. Minor overlap exists where audit surfaces duplicates and consent gaps that deduplicate and apply_consent_mode then fix, but the strong action verbs keep the boundaries clear.

Naming Consistency5/5

All tool names follow the identical `gtm_<verb>_<object>` snake_case pattern with perfect consistency. The `gtm_` prefix scopes everything to the domain, and every verb is a single lowercase action word.

Tool Count5/5

Five tools is a well-scoped surface for a GTM tag-management assistant. Each tool addresses a distinct stage of the tag lifecycle—audit, cleanup, compliance, templating, and developer handoff—without feature bloat.

Completeness4/5

The core architecture workflow is well covered: audit, deduplicate, configure consent, add standard tags, and generate TypeScript datalayer helpers. Publication/preview submission and tag removal are missing, so agents may need workarounds, but the primary setup path is fully covered.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    MCP server for Google Tag Manager and GA4, enabling tag management, consent auditing, workspace versioning, and analytics reporting through natural language.
    11
    37 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for Google Tag Manager API v2, enabling programmatic management of accounts, containers, workspaces, tags, triggers, variables, and version workflows.
    20 npm
    15
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    An MCP server for the Google Tag Manager API v2 that enables AI assistants to query GTM accounts, containers, tags, triggers, variables, and unpublished changes.
    24
    1
    Apache 2.0