Skip to main content
Glama

Opus Growth, Ad Platforms MCP Connector

Create GTM Variable

create_gtm_variable

Creates a user-defined VARIABLE. variable_type = GTM type string: 'c' (Constant → parameters='{"value":"..."}'), 'v' (Data Layer Variable → parameters='{"name":"ecommerce.value"}' plus optional dataLayerVersion), 'jsm' (Custom JavaScript → parameters='{"javascript":"function(){return ...}"}'), 'u' (URL), 'k' (1st-party Cookie → '{"name":"_ga"}'). parameters is JSON: an object {key:value} (wrapped as template) or a raw GTM parameter list. SAFETY: confirm=false → preview; confirm=true → creates it (staged until publish).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
confirmNo
containerNo
workspaceNo
parametersNo
variable_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added
  4. Removed
  5. Added
  6. Removed
  7. Added
  8. Removed
  9. Added
  10. Removed
  11. Added
  12. Removed
  13. Added
  14. Removed
  15. Added
  16. Removed
  17. Added
  18. Removed
  19. Added
  20. Removed
  21. Added
  22. Removed
  23. Added
  24. Removed
  25. Added
  26. Removed
  27. Added
  28. Removed
  29. Added
  30. Removed
  31. Added
  32. Removed
  33. Added
  34. Removed
  35. Added
  36. Removed
  37. Added
  38. Removed
  39. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds genuinely new behavior: a two-phase preview/commit workflow via confirm and the fact that creation is staged until a publish step. It omits auth/permission requirements and duplicate-name behavior.

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?

Front-loaded with purpose, then type semantics, then safety. The middle sentence is dense but every clause carries mapping information an agent needs to build a valid payload; nothing is redundant.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the description covers the mutation's staging and preview semantics plus payload construction. The remaining gap is scoping (container/workspace defaults) and post-create publish flow, which are minor for a creation tool with annotated safety.

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 0%, so the description must compensate, and it does for the two hardest parameters: variable_type is enumerated with worked examples and parameters gets concrete JSON payloads per type. It leaves container and workspace undocumented, though those are conventional GTM scoping fields, and confirm is only covered via the SAFETY note.

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?

Opens with a specific verb+resource ('Creates a user-defined VARIABLE') and immediately scopes it to the GTM variable domain, distinguishing it from sibling creators like create_gtm_tag, create_gtm_trigger, and create_gtm_container. The type taxonomy ('c', 'v', 'jsm', 'u', 'k') makes the exact artifact unambiguous.

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 operational context: confirm=false previews, confirm=true creates, and results are staged until publish. It does not, however, route the agent away from alternatives such as update_gtm_entity for modifying an existing variable, nor state prerequisites (e.g., an existing container/workspace).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.