Skip to main content
Glama
webanalyticsprobd-maker

Web Analytics & Tracking MCP Server

generate_tracking_code_snippet

Generate production-ready tracking code snippets for GTM dataLayer, GA4 gtag.js, or React hooks from event name and parameters.

Instructions

Generates production-ready tracking code snippets for GTM dataLayer.push, GA4 gtag.js, or React custom hook.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesTarget platform format for code generation
eventNameYesName of event (e.g. 'add_to_cart', 'lead')
parametersYesEvent parameters key-value object
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that it generates 'production-ready' snippets, but does not disclose side effects (e.g., whether it modifies anything), authentication requirements, or output format. This is a significant gap for a tool with no annotation support.

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 a single sentence that front-loads the verb and resource, and lists the key platform options. Every word contributes value, with no filler or repetition.

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?

Given the tool's moderate complexity (3 required parameters, nested parameters object) and no output schema, the description is adequate but gaps remain. It does not explain the output format of the generated snippet or clarify when to use this tool instead of related siblings. The schema covers inputs well, but the absence of annotations and output schema leaves some ambiguity about behavior and results.

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?

The input schema provides 100% coverage of parameters, including descriptions and an enum for platform. The description redundantly lists the platforms in prose ('GTM dataLayer.push, GA4 gtag.js, React custom hook'), but this adds little beyond the schema's enum. Baseline 3 is appropriate given the high schema coverage.

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 uses a specific verb 'Generates' with a clear resource ('tracking code snippets') and enumerates the target platforms (GTM dataLayer.push, GA4 gtag.js, React custom hook). This clearly distinguishes it from sibling tools focused on auditing, validating, or sending events.

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 implies when to use the tool (when you need tracking code snippets for these platforms), but it does not provide explicit guidance on when to choose this tool over siblings like validate_datalayer_event or send_ga4_measurement_protocol_event. There are no exclusions or alternative recommendations.

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/webanalyticsprobd-maker/tracking-mcp-server'

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