Skip to main content
Glama

GA4: create custom metric

ga4_create_custom_metric

Create a custom metric on a GA4 property. It adds one custom metric and changes nothing existing; reports show it from now on, for events that send the parameter it names.

Tools revision: d80f65c0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "property": "<property>",
      "parameter_name": "<parameter_name>",
      "display_name": "<display_name>"
    },
    "name": "ga4_create_custom_metric"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNoEVENT
propertyYes
display_nameYes
parameter_nameYes
measurement_unitNoSTANDARD

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare non-readOnly, non-destructive and non-idempotent, and the description adds real value on top: the mutation is purely additive ('changes nothing existing') and takes effect in reporting 'from now on'. It does not cover GA4's custom-metric quota limits or the fact that the definition is not retroactive for past events, which would be worth one more line.

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?

Three short sentences, front-loaded with the action and its safety profile, with no filler. The trailing 'Tools revision: d80f65c0.' is build metadata that earns no place in a tool description.

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?

The output schema means return values need no explanation, and the additive/non-destructive behavior is well covered. But for a 5-parameter mutation with zero schema coverage, the description leaves the agent guessing on field values and on GA4-specific constraints, so it is adequate rather than complete.

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

Parameters2/5

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

Schema description coverage is 0% and the description only glancingly gestures at parameter_name ('the parameter it names'). It says nothing about property, display_name, or the two defaulted fields scope (EVENT) and measurement_unit (STANDARD/CURRENCY), whose valid values and consequences are entirely undocumented in both the schema and the description.

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?

States a specific verb and resource ('Create a custom metric on a GA4 property') and immediately scopes the effect: 'It adds one custom metric and changes nothing existing.' That clause implicitly separates it from ga4_update_custom_metric and ga4_list_custom_metrics, so an agent can distinguish create from update/list without opening a schema.

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?

Usage is implied rather than stated: you create a metric when you want a new one, and the description notes it applies 'for events that send the parameter it names', which hints at prerequisites. But there is no explicit when-to-use/when-not guidance versus ga4_create_custom_dimension or ga4_update_custom_metric, and no mention of required permissions or per-property custom-metric limits.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources