Skip to main content
Glama
kLOsk

AdLoop: Google Ads, Reddit Ads & GA4

Tag Manager version diff

get_gtm_version_diff
Read-only

Compare two GTM container versions to see added, removed, and changed tags, triggers, and variables after a publish.

Instructions

Compare two GTM container versions: what a publish changed.

Returns added, removed and changed tags, triggers and variables (with names, types and the changed fields; parameters and trigger conditions are diffed key by key), plus built-in variables enabled or disabled. By default compares the live version with the version created before it. The Tag Manager API does not mark which versions were published, so that default "before" version may never have been live. Makes two or three Tag Manager API calls.

Tag Manager API: https://developers.google.com/tag-platform/tag-manager/api/v2

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_version_idNoNewer version ID. Empty uses the live (published) version.
gtm_account_idNoNumeric GTM account ID (see list_gtm_accounts). Empty uses gtm.account_id from the config.
from_version_idNoOlder version ID (see list_gtm_versions). Empty uses the newest non-archived version created before to_version_id.
gtm_container_idNoNumeric GTM container ID (see list_gtm_containers). Empty uses gtm.container_id from the config.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.27.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds genuinely new behavior: it enumerates what the diff covers (tags/triggers/variables key-by-key, plus built-in variables), discloses the API cost ('two or three Tag Manager API calls'), and flags the reliability caveat that GTM does not mark which versions were published.

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?

Front-loaded with the single-sentence purpose, then layered detail on the diff contents, defaults, and caveats. Every sentence carries distinct information; nothing is padding.

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

Completeness5/5

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

With an output schema present, return-value detail is optional, yet the description still covers diff scope, defaults, caveats, and API-call cost. An agent has everything needed to select and invoke it correctly.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description reinforces and explains the defaults ('compares the live version with the version created before it') and ties the caveat to why from_version_id may need to be set explicitly, adding meaning beyond the raw schema defaults.

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?

States a specific verb and resource ('Compare two GTM container versions') plus the scope ('what a publish changed'), which is far more precise than a bare name restatement. The version-scoped framing naturally separates it from the workspace-level sibling get_gtm_workspace_diff.

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

Usage Guidelines4/5

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

Gives clear context for use (post-publish change inspection), explains the default comparison behavior, and warns that the default 'before' version may never have been live. It stops short of naming the alternative tool for workspace diffs, so the agent must infer that routing.

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

Deploy Server

Other Tools