mcp-gtm-audit
v0.2.0MCP server for Google Tag Manager: audit containers, validate GA4/Google Ads/Meta tracking, diff workspaces against versions, export importable container JSON…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gtm_doctor
Check credentials, granted scopes, write mode and API access. Call this first when something fails.
list_accounts
List the GTM accounts visible to the authorized Google user.
list_containers
List the containers of an account, with the numeric containerId the other tools need. Args: account_id: numeric GTM account id.
| Parameter | Type | Description |
|---|---|---|
account_id * | string |
list_workspaces
List the workspaces of a container (id, name, description).
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string |
list_versions
List the published version headers of a container (id, name, entity counts).
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string |
list_tags
List the tags of a workspace (default: Default Workspace) with type, paused state and trigger ids.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
workspace_id | string |
list_triggers
List the triggers of a workspace (id, name, type).
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
workspace_id | string |
list_variables
List the user-defined variables of a workspace (id, name, type).
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
workspace_id | string |
get_entity
Return one tag, trigger, variable or folder in full (parameters, triggers, consent settings). Use it before update_* to see the exact resource shape, and to copy an existing entity as the starting point for a new one. Args: kind: tag, trigger, variable or folder. entity_id: the tagId / triggerId / variableId / folderId.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
entity_id * | string | |
kind * | string | |
workspace_id | string |
gtm_audit
Run the full audit and write an HTML plus a JSON report; returns stats and the file paths. Args: account_id: numeric GTM account id. container_id: numeric container id (not the GTM-XXXX public id). workspace_id: workspace to audit; empty = Default Workspace. use_live_version: audit the published version instead of a workspace. output_dir: where to write; default <reports dir>/<client_slug or container name>/. client_slug: folder name under the reports dir; default = container name. language: en or it, for the report and the issue wor…
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
client_slug | string | |
language | string | |
output_dir | string | |
use_live_version | boolean | |
workspace_id | string |
gtm_diff
Compare two snapshots: added, removed and modified entities with the fields that changed. Args: base_ref: 'live', a published version id, or 'workspace'. head_ref: 'workspace' (uses workspace_id) or a version id. workspace_id: workspace for 'workspace' refs; empty = Default Workspace.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
base_ref | string | |
head_ref | string | |
workspace_id | string |
gtm_tracking_validation
Map GA4 events per Measurement ID, Google Ads conversions, Meta pixels and server-side hints, with findings.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
language | string | |
use_live_version | boolean | |
workspace_id | string |
gtm_export
Write a container export JSON in GTM's own import format and return its path. The file can be imported from Admin > Import container (merge or overwrite, always into a workspace), which is the safe path when write mode is off. Args: output_path: file to write; default <reports dir>/<container>/gtm-export-<stamp>.json.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
container_id * | string | |
output_path | string | |
use_live_version | boolean | |
workspace_id | string |