Skip to main content
Glama
mharnett

mcp-gtm-ga4

by mharnett

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GTM_ACCOUNT_IDYesGTM account ID
GA4_PROPERTY_IDYesGA4 property ID
MCP_SERVER_NAMENoServer name (defaults to package name mcp-gtm-ga4)
GTM_CONTAINER_IDYesGTM container ID
GTM_SANDBOX_WORKSPACE_IDNoOverride workspace ID (auto-detects Default Workspace if omitted)
GOOGLE_APPLICATION_CREDENTIALSYesPath to a GCP service account JSON key file

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
gtm_get_client_contextA

Health check and status overview. Returns GTM container path, workspace ID, GA4 property ID, and server version. Use this to verify connectivity.

gtm_list_tagsA

List all tags in the sandbox GTM workspace with name, type, consent status, and firing triggers.

gtm_get_tagA

Get full details of a single tag by ID from the sandbox workspace.

gtm_update_tagA

Update a tag in the sandbox workspace. Fetches current tag, merges updates, then saves. Safety: only operates on sandbox workspace.

gtm_create_tagA

Create a new tag in the sandbox workspace. Safety: only operates on sandbox workspace.

gtm_list_triggersA

List all triggers in the sandbox GTM workspace.

gtm_list_variablesA

List all variables in the sandbox GTM workspace.

gtm_get_variableA

Get full details of a single variable by ID from the sandbox workspace.

gtm_create_variableB

Create a new variable in the sandbox workspace. Safety: only operates on sandbox workspace.

gtm_update_variableA

Update a variable in the sandbox workspace. Fetches current variable, merges updates, then saves. Safety: only operates on sandbox workspace.

gtm_delete_variableA

Delete a variable from the sandbox workspace. Destructive. Safety: only operates on sandbox workspace.

gtm_audit_consentA

Scan all tags in the sandbox workspace and report consent compliance. Returns tags with no consent, NOT_NEEDED tags, properly configured tags, and recommendations.

gtm_previewA

Generate a GTM Preview URL for the sandbox workspace.

gtm_create_versionA

Create a version (snapshot) of the sandbox workspace. Does NOT publish.

gtm_ga4_run_reportB

Query GA4 historical report for the property linked to this GTM container.

gtm_ga4_realtime_reportA

Query GA4 Realtime Report (last 30 minutes) for the property linked to this GTM container.

gtm_ga4_list_custom_dimensionsA

List all registered custom dimensions for the GA4 property linked to this GTM container.

gtm_ga4_create_custom_dimensionB

Register a new custom dimension in the GA4 property linked to this GTM container.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/mharnett/mcp-gtm-ga4'

If you have feedback or need assistance with the MCP directory API, please join our Discord server