Tag Pilot GTM

v0.1.0
io.github.tagpilot/gtm-mcp Checked 3 days ago Published 21 days ago

Free, read-only Google Tag Manager: containers, tags, diffs vs live, audits.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_accounts List Tag Manager accounts

Lists the Google Tag Manager accounts the signed-in Google account can read, with their numeric IDs. Start here.

list_containers List containers

Containers in a Tag Manager account: numeric container ID, public ID (GTM-XXXXXXX), name, usage context (web, server, amp, ios, android) and domains.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.

list_workspaces List workspaces

Workspaces of a container (where unpublished changes are made), with IDs and descriptions. Pass workspace_id to the other tools to read a workspace instead of the live version.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").

get_container Get container contents

Everything in a container: tags (with their firing and blocking triggers by name, paused state), triggers, variables, custom templates, folders and enabled built-in variables; clients and transformations for server containers. Reads the live (published) version by default, or a workspace (workspace_id) or an older version (version_id). Compact by default; use get_tag / get_trigger / get_variable for one entity in full.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
detailstring"compact" (default): id, name, type, folder and triggers per entity. "full": every entity body as the API returns it (large).
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

list_versions List container versions

Container versions, newest first: version ID, name, entity counts, and which one is live (published). Pass a version_id to get_container, diff or the get_* tools to read an older version.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
include_deletedbooleanAlso list deleted versions. Default false.
limitintegerHow many versions to return. Default 50.

get_live_version Get the live (published) version

The container version that is live on the site: version ID, name, description, and its contents (compact by default, like get_container).

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
detailstring"compact" (default): id, name, type, folder and triggers per entity. "full": every entity body as the API returns it (large).

get_tag Get one tag

One tag in full (by id or name): type, parameters, firing and blocking triggers (with names), consent settings, tag sequencing, firing option, schedule, notes, and the variables it uses. Reads the live version unless workspace_id or version_id is given.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
idstringNumeric ID.
namestringExact name (case-insensitive match as a fallback). Pass id or name.
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

get_trigger Get one trigger

One trigger in full (by id or name): type, conditions (filter, customEventFilter, autoEventFilter), parameters, the variables it uses, and the tags, trigger groups and variables that use it. Reads the live version unless workspace_id or version_id is given.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
idstringNumeric ID.
namestringExact name (case-insensitive match as a fallback). Pass id or name.
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

get_variable Get one variable

One variable in full (by id or name; built-in variables such as "Page URL" by name): type, parameters, format settings, the variables it uses, and the tags, triggers and variables that use it. Reads the live version unless workspace_id or version_id is given.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
idstringNumeric ID.
namestringExact name (case-insensitive match as a fallback). Pass id or name.
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

find_references Find references

What uses an entity: for a variable (or built-in variable), every tag, trigger, variable or client containing {{Name}}; for a trigger, the tags that fire on or are blocked by it, trigger groups and variables; for a tag, tags that sequence it; for a custom template, the tags, variables and clients built from it; for a folder, its contents. Check this before suggesting to change, rename or delete something.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
kind *stringWhat to look up.
idstringNumeric ID.
namestringExact name (case-insensitive match as a fallback). Pass id or name.
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

diff Diff a workspace against the live version

What publishing a workspace would change: entities added, changed (with the changed fields, and renames) and deleted compared with the live version (or another version_id). Compares the actual contents, so it also shows changes that reached the live version after the workspace was created (the workspace then needs updating in GTM). Set include_values for the before/after values of changed fields.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
workspace_id *stringThe workspace to compare, from list_workspaces.
include_valuesbooleanInclude before/after values of the changed fields. Default false.
version_idstringCompare against this version instead of the live one.

audit_container Tag Pilot check: container audit

Tag Pilot tracking-health check for a GTM container. Flags tags that can never fire (no triggers, missing triggers, expired schedules), paused tags, unused triggers and variables, non-Google tags without consent settings (web containers), Google tag / GA4 configuration IDs loaded by more than one tag (double counting), and, for a workspace, changes that are not published yet. Reads the live version by default; pass workspace_id to audit a workspace (one extra call for the live version). Findings are sorted high → info.

ParameterTypeDescription
account_id *stringNumeric Tag Manager account ID, from list_accounts.
container_id *stringNumeric container ID from list_containers, or the public ID ("GTM-XXXXXXX").
version_idstringRead this container version ("live" or a number from list_versions). Default: the live (published) version.
workspace_idstringRead this workspace (unpublished changes included), from list_workspaces. Omit both workspace_id and version_id for the live version.

connect Connect GTM MCP

Connects this computer to Tag Pilot GTM MCP (free Tag Pilot account + read-only Google Tag Manager access). Call it when the user asks to connect, or when another tool says the computer is not connected. It returns a link and a code: show both to the user as given (a clickable link), ask them to open it, approve and allow Google access, and tell you when done; then call connection_status. Never ask the user to run terminal commands. If already connected, it says so.

connection_status GTM MCP connection status

Whether this computer is connected to Tag Pilot GTM MCP: "connected" (with the device name), "waiting" (a sign-in link is open; shows the link and code again), "not_connected" (call connect) or "error" (with the next step). While a sign-in is open it waits up to 25 seconds for the approval before answering, so call it after the user says they approved, not in a fast loop.

ParameterTypeDescription
waitbooleanWait up to 25 s for an open sign-in to complete. Default true.