Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

templates_import_from_gallery

Import a community template from the GTM Gallery by GitHub owner/repo to use third-party pixels as official sandboxed tags instead of Custom HTML.

Instructions

[WRITE] Install a Community Template Gallery template into a workspace by GitHub owner and repository, so a THIRD-PARTY pixel can use its official sandboxed template instead of Custom HTML. NOT for Google's own tags. GA4, Google Ads and Floodlight are BUILT IN to GTM as native tag types (googtag, gaawe, awct, sp, flc), there is no gallery repository for them, and asking for one answers "404 Not found or permission denied". To build a GA4 event tag call tags_create with type "gaawe" directly; do not import anything first. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. The GTM API DOES support this (templates.import_from_gallery); never tell the user it is UI-only. Idempotent: importing one already present returns it unchanged rather than creating a duplicate. Returns the installed template. To build a tag on it you need its tag TYPE (a cvt_... string): READ that from the container rather than constructing it from the templateId, because the format is not what it appears to be. Pass the exact string as type to tags_create along with that template's own field keys (template-specific, e.g. Meta Pixel uses pixelId). Common pairs: facebook/GoogleTagManager-WebTemplate-For-FacebookPixel (Meta Pixel), tiktok/gtm-template-pixel (TikTok), linkedin/linkedin-gtm-community-template (LinkedIn Insight Tag 2.0), Snapchat/snapchat-google-tag-manager (Snap Pixel), pinterest/ws-gtm-template (Pinterest, web) or pinterest/ss-gtm-template (Pinterest, server), stape-io/facebook-tag and stape-io/tiktok-tag (Stape server-side).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoOptional gallery version SHA. Defaults to the latest published version.
ownerYesGitHub owner of the gallery template, e.g. "linkedin".
confirmYesMust be true to confirm this write operation.
accountIdYesThe GTM account ID.
repositoryYesGitHub repository, e.g. "linkedin-gtm-community-template".
containerIdYesThe GTM container ID.
workspaceIdYesThe GTM workspace ID.
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and succeeds. It discloses the write nature ('[WRITE]'), requirements (GTM_MCP_ENABLE_WRITES=true, confirm=true), idempotency, return value, and API support. It also warns about the 404 error for Google tags and the need to read the tag type from the container rather than constructing it.

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?

The description is long but each sentence carries essential information: purpose, exclusions, alternatives, prerequisites, idempotency, return value, and common usage patterns. There is no filler or redundancy; the density is justified by the tool's complexity.

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?

For a write tool with no annotations or output schema, the description covers all needed context: operation semantics, exact usage constraints, error expectations, and follow-up steps. It leaves no critical gap for an agent to misuse the tool.

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?

The schema already covers all 7 parameters with descriptions (100% coverage), so baseline is 3. The description adds value by providing concrete examples for owner/repository pairs and emphasizing confirm must be true. It also explains how the result's tag type should be used with tags_create, though it doesn't add new parameter descriptions. This elevates it above baseline.

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?

The description clearly states the action: 'Install a Community Template Gallery template into a workspace by GitHub owner and repository.' It also distinguishes this tool from siblings by explicitly excluding Google's own tags and targeting third-party pixels, making it unambiguous which tool to invoke.

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

Usage Guidelines5/5

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

It provides explicit when-to-use guidance: 'NOT for Google's own tags', directs users to tags_create with type 'gaawe' for GA4, and lists common repository pairs. It also clarifies the API support, preventing the agent from falsely claiming the operation is UI-only.

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

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