Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

ga4_create_custom_metric

Register an event parameter as a custom metric in GA4. Specify measurement unit, scope (EVENT), and optionally set restricted metric types for cost or revenue data.

Instructions

[GA4 WRITE] Create a custom metric. Requires GA4_MCP_ENABLE_WRITES=true and confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesCustom metric scope (EVENT).
confirmYesMust be true to apply the change.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
descriptionNo
displayNameYes
parameterNameYesEvent parameter name to register as a metric.
measurementUnitYesMeasurement unit.
restrictedMetricTypeNoRestricted-metric types (for CURRENCY metrics).
Behavior2/5

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

With no annotations, the description fully bears the burden. It discloses it's a write operation and requires confirm, but omits return values, error scenarios (e.g., duplicate parameterName), idempotency, or side effects. Important behavioral context is missing.

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?

A single sentence conveying purpose and key requirements. Very concise and front-loaded. Could slightly improve structure by separating purpose from requirements, but currently efficient.

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

Completeness2/5

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

Given 8 parameters, no output schema, and no annotations, the description is too minimal. It lacks details on output, error handling, and usage context, making it incomplete for a write operation.

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?

Schema description coverage is 75%, so the schema already documents most parameters. The description adds only the confirm requirement, offering no additional meaning beyond schema. Baseline of 3 is appropriate.

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 'Create a custom metric' with a write tag, specifying the verb and resource. However, it does not differentiate from siblings like ga4_create_custom_dimension or ga4_create_calculated_metric, leaving potential confusion.

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?

It explicitly requires GA4_MCP_ENABLE_WRITES=true and confirm=true, providing clear usage conditions. But it gives no guidance on when to use this vs. alternatives (e.g., ga4_update_custom_metric) or prerequisites like property existence.

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