Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

variables_create

Create a GTM variable by specifying account, container, workspace, name, type, and optional parameters. Write and confirm flags must be enabled.

Instructions

[WRITE] Create a GTM variable. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVariable name.
typeYesVariable type (e.g. "v" for data layer, "k" for first-party cookie, "u" for URL, "c" for constant, "jsm" for custom JS, "smm" for lookup table, "gas" for GA settings).
notesNo
confirmYes
accountIdYes
parameterNoGTM parameter list — supports NESTED list/map params. Example (a GA4 event parameter table): [{"type":"list","key":"eventSettingsTable","list":[{"type":"map","map":[{"type":"template","key":"parameter","value":"click_text"},{"type":"template","key":"parameterValue","value":"{{Click Text}}"}]}]}].
containerIdYes
workspaceIdYes
parentFolderIdNo
enablingTriggerIdNo
disablingTriggerIdNo
Behavior2/5

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

With no annotations provided, the description bears full responsibility for behavioral disclosure. It only mentions that the tool is a write operation and requires a confirm parameter, but fails to describe side effects, error handling, idempotency, or what happens if creation fails or duplicates are attempted. This is insufficient for safe agent invocation.

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?

The description is extremely concise—a single sentence front-loaded with the write indicator. While it is efficient and to-the-point, it sacrifices necessary detail, making it borderline under-specified. It earns high marks for brevity but loses on completeness.

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

Completeness1/5

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

Given the tool's complexity (11 parameters, nested parameter structure, no output schema, low schema coverage), the description is woefully incomplete. It does not explain how to construct the parameter array, variable types, or required structure, leaving an agent without sufficient context to invoke the tool correctly.

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

Parameters2/5

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

Schema description coverage is only 27%, so the tool description should compensate. However, the description contains no parameter information at all. The schema itself provides some descriptions for 'type', 'parameter', and nested structures, but the tool description adds no value in explaining parameter meanings, usage, or examples, leaving many parameters underdocumented.

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 clearly states it creates a GTM variable and marks it as a write operation. It identifies the resource and action, which distinguishes it from read or update sibling tools. However, it lacks detail about what a GTM variable is or the variety of types it supports, which would enhance clarity.

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?

The description specifies prerequisites (GTM_MCP_ENABLE_WRITES=true and confirm=true), indicating when this tool can be used. It does not, however, provide guidance on when to choose this tool over alternatives like variables_update or the possibility of duplicate creation, nor does it outline exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samarthanalytics-sj/samarth-analytics-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server