Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

workspace_resolve_conflict

Resolve a Google Tag Manager workspace entity merge conflict by supplying the resolved body and entity type; the tool wraps it in the required Entity envelope.

Instructions

Resolve a merge conflict for a workspace entity. You supply the resolved entity body plus its type; the GTM API wraps it in an Entity envelope ({ "tag": {...} } / { "trigger": {...} } / …), which this tool builds for you. NOTE: This is a complex operation — review the GTM UI conflict resolution first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "accountId": "<accountId>",
      "containerId": "<containerId>",
      "workspaceId": "<workspaceId>",
      "fingerprint": "<fingerprint>",
      "entityType": "<entityType>",
      "entityJson": "<entityJson>",
      "confirm": "<confirm>"
    },
    "name": "workspace_resolve_conflict"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true to confirm this write operation.
accountIdYesThe GTM account ID.
entityJsonYesJSON string of the RAW entity body (e.g. the tag object itself), NOT the Entity envelope — it is wrapped under entityType for you. If you pass an already-wrapped { "<entityType>": {...} } object it is used as-is.
entityTypeYesWhich Entity slot the resolved body fills. The resolve_conflict API takes an Entity envelope, so a resolved tag is sent as { "tag": {...} }, a trigger as { "trigger": {...} }, etc.
containerIdYesThe GTM container ID.
fingerprintYesThe workspace fingerprint at the time of conflict resolution.
workspaceIdYesThe GTM workspace ID.
changeStatusNoHow the resolved entity changed relative to the base version (added/deleted/modified/none). Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / containerId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / workspaceId / pattern
      Added value: +"^\\d+$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Changed4 schema fields changedv1.263.0
    • addedInput schema / properties / changeStatus
      Added value: +{
      +  "description": "How the resolved entity changed relative to the base version (added/deleted/modified/none). Optional.",
      +  "enum": [
      +    "added",
      +    "deleted",
      +    "modified",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / entityJson / description
      Previous value: -"JSON string of the full entity (tag/trigger/variable/folder) to use as the resolved version."New value: +"JSON string of the RAW entity body (e.g. the tag object itself), NOT the Entity envelope — it is wrapped under entityType for you. If you pass an already-wrapped { \"<entityType>\": {...} } object it is used as-is."
    • addedInput schema / properties / entityType
      Added value: +{
      +  "description": "Which Entity slot the resolved body fills. The resolve_conflict API takes an Entity envelope, so a resolved tag is sent as { \"tag\": {...} }, a trigger as { \"trigger\": {...} }, etc.",
      +  "enum": [
      +    "tag",
      +    "trigger",
      +    "variable",
      +    "folder",
      +    "client",
      +    "customTemplate",
      +    "gtagConfig",
      +    "transformation",
      +    "zone",
      +    "builtInVariable"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "accountId",
      -  "containerId",
      -  "workspaceId",
      -  "fingerprint",
      -  "entityJson",
      -  "confirm"
      -]New value: +[
      +  "accountId",
      +  "containerId",
      +  "workspaceId",
      +  "fingerprint",
      +  "entityType",
      +  "entityJson",
      +  "confirm"
      +]
  5. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that the tool wraps the body in an Entity envelope for you and that this is a 'complex operation' requiring UI review, but it omits whether the resolution is reversible, what permissions are needed, what happens to other pending conflicts, or what the call returns.

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?

Three short sentences, front-loaded with the purpose, then the input contract, then the risk note. Every sentence earns its place, though the envelope explanation partially duplicates the entityJson/entityType schema descriptions.

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?

For an 8-parameter mutation with no annotations and no output schema, the description covers the wrapping behavior and flags complexity, but leaves significant gaps: post-resolution state, error handling when the fingerprint is stale, and required permissions are all unstated.

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?

Schema description coverage is 100%, so baseline is 3. The description reinforces the trickiest parameter semantics (entityJson is raw, wrapped under entityType) but adds no meaning beyond what the schema already documents for fingerprint, changeStatus, or confirm.

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

Purpose4/5

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

The description opens with a specific verb and resource ('Resolve a merge conflict for a workspace entity') and immediately states the input contract (resolved entity body plus type). An agent knows exactly what operation this performs. It stops short of naming a sibling or contrasting scope, but no close alternative appears in the contextual sibling list.

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?

It gives a cautionary prerequisite ('review the GTM UI conflict resolution first') and the required 'confirm' flag implies this is a deliberate write, but it never states when this tool should be chosen over other workspace operations (e.g. workspace_sync) or what preconditions must hold, such as fingerprint currency.

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