Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

templates_import_from_gallery

Import a community template from the Gallery into a GTM workspace by GitHub owner/repo, so it can be used for tag creation.

Instructions

[WRITE] Install a Community Template Gallery template into a workspace by GitHub owner and repository, so a pixel can use its official sandboxed template instead of Custom HTML. 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.
Behavior5/5

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

Since no annotations are provided, the description carries the full burden. It discloses the write operation ([WRITE]), the required environment variable and confirm flag, idempotency ('importing one already present returns it unchanged'), and that the API supports it. It also warns about the tag type format, which is a nuanced behavior beyond simple schema.

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 long but every sentence contains essential information—prerequisites, behavior, downstream integration, common pairs. It's front-loaded with the primary purpose and uses [WRITE] to signal safety. However, the wall-of-text format could be better structured, so a 4 is appropriate.

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?

This tool is complex with 7 parameters and integration with tags_create. The description covers prerequisites, exact behavior, return value, and practical examples. With no output schema, it still clearly states 'Returns the installed template.' This is complete.

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

Parameters5/5

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

The schema descriptions are generic (e.g., 'The GTM account ID'), but the description enriches them with concrete examples (github owner/repo pairs), explains the confirm flag requirement, and notes the sha default. This adds meaningful semantics beyond the raw schema.

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.' This is a specific verb and resource, and distinguishes from sibling tools like templates_create by specifying the gallery import source.

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 explicitly says this is for using an official sandboxed template 'instead of Custom HTML,' and warns to 'never tell the user it is UI-only,' providing clear context for when to use it. It also provides downstream guidance on how to build tags with the returned template, reinforcing proper usage.

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