Skip to main content
Glama
Google Workspace MCP connector

Google Workspace MCP connector

by animesh-ex

gtm_upsert

Create or update any Google Tag Manager tag, trigger, or variable from raw GTM API resource JSON. Pass an ID to update an existing resource; omit it to create a new one.

Instructions

Advanced: create or update any tag, trigger or variable using the raw GTM API resource JSON (e.g. Custom HTML tags, Meta/Google Ads tags, click or form triggers, lookup tables). With id → update; without → create.

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": {
      "workspace": "<workspace>",
      "entity": "<entity>",
      "resource": "<resource>"
    },
    "name": "gtm_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
entityYes
resourceYesTag/Trigger/Variable body: name, type, parameter[], firingTriggerId[], filter[], customEventFilter[] …
workspaceYesWorkspace path (accounts/…/containers/…/workspaces/…), or a container public ID like GTM-XXXX (uses its Default Workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, open-world, non-destructive write, so the bar is lower; the description still adds the genuinely useful id-presence rule that determines create vs update. However, for a mutation that takes a full raw resource body it never says whether an update replaces the whole resource or merges fields, nor what happens on a partial body — the single most important behavioral ambiguity for an upsert.

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?

Two tight sentences with the qualifier and the core behavior front-loaded and no filler; the parenthetical examples earn their space by disambiguating scope. Slightly dense, but nothing extraneous.

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?

This is a complex, nested-object mutation with no output schema, so the description should carry return-value and permission context. It covers what the resource JSON is and the create/update switch, but leaves an agent unable to predict the response (e.g. returned identifier for chaining) or the replace-vs-merge outcome.

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 coverage is only 50%: workspace and resource bodies are described in-schema, entity has an enum, but id carries no schema description at all. The description rescues id by defining its create/update switch, which is real added value, yet it adds nothing about the required resource body structure or entity-selection semantics beyond the enum.

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?

States a specific verb pair (create or update) and resource set (tag, trigger, variable) plus the mechanism (raw GTM API resource JSON), reinforced with concrete examples like Custom HTML tags and lookup tables. It is not tautological and implicitly contrasts with the specialized siblings (gtm_add_ga4_tags, gtm_add_event_trigger), but it never names an alternative outright.

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?

"Advanced:" plus the explicit rule "With id → update; without → create" tells an agent exactly which branch of behavior it will get for a given input. What is missing is a named exclusion — it does not say 'for standard GA4 tags prefer gtm_add_ga4_tags' — so the fallback role is suggested rather than stated.

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