Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

ga4_create_custom_metric

Create a custom metric in a GA4 property by registering an event parameter. Specify parameter name, display name, measurement unit, and scope. Requires write enable flag and confirmation.

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?

No annotations are provided, so the description carries full behavioral disclosure burden. It only states that it is a write operation and requires confirm=true, but does not disclose side effects (e.g., whether it creates a new metric or replaces an existing one), return value, or idempotency. The '[GA4 WRITE]' prefix and prereq are minimal behavioral context.

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 a single, front-loaded sentence with no redundant information. It efficiently conveys the core action and a key prerequisite. However, it might be too terse given the tool's complexity.

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?

With 8 parameters, 6 required, no output schema, and no annotations, the description is insufficient. It fails to explain what the tool returns, how errors are handled, or how this tool relates to other GA4 custom metric tools (e.g., archiving, updating). A more complete description would include return format and common use cases.

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% (6 of 8 parameters have descriptions), so the schema already explains most parameters. The tool description does not add any additional parameter meaning beyond the schema, but it does reiterate the confirm requirement. Baseline 3 is appropriate given high schema coverage.

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 the verb 'Create' and resource 'custom metric', and includes a '[GA4 WRITE]' prefix indicating write operation. The name itself distinguishes from sibling tools like ga4_archive_custom_metric and ga4_update_custom_metric, but the description does not elaborate on what a custom metric is or how it differs from a custom dimension.

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 mentions prerequisites (GA4_MCP_ENABLE_WRITES=true and confirm=true), implying when to use. However, it provides no guidance on alternatives (e.g., ga4_update_custom_metric) or exclusions. Usage is implied by the tool name rather than explicitly stated.

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