Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Update Key Event

ga4_update_key_event
DestructiveIdempotent

Change how one existing GA4 key event counts in the user's connected Google Analytics property: its counting method (once per event or once per session) and/or its default value and currency, or clear the default value. Only the fields passed change; the event name cannot. Unchanged values are reported as no change. dry_run previews. Changes configuration only after the user approved it.

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_id": "<property_id>",
      "key_event": "<key_event>"
    },
    "name": "ga4_update_key_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNotrue: read the current configuration and report the field-level changes this call would make, changing nothing. Default false. Show the user the proposal and get their approval before calling without dry_run.
key_eventYesThe key event: its event name (purchase) or key event id from ga4_get_tracking_configuration.
property_idYesThe GA4 property: its number (123456789) or properties/123456789. Must be one of the properties ga4_get_account_summaries lists for the connected login.
currency_codeNoISO currency of default_value, e.g. USD.
default_valueNoValue recorded when the event carries no value parameter. Needs currency_code.
counting_methodNoONCE_PER_EVENT counts every occurrence (purchases); ONCE_PER_SESSION counts one per session (leads, sign-ups).
clear_default_valueNotrue removes the default value.

Output Schema

NameRequiredDescriptionDefault
afterNoThe resource after the call (Google's read-back), or the proposal on a dry run.
beforeNoThe resource before the call; null when it did not exist.
dryRunYesTrue when the call only previewed the change.
changedYesTrue only when this call changed Google Analytics.
changesYesField-level changes: made, or proposed on a dry run.
propertyYesproperties/<number>.
resourceNoResource name the change targets, when it exists.
verifiedNoWhether Google's read-back holds every requested value; null when nothing was written.
operationYesWhat happened: the change made, no_change, or dry_run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=true), the description discloses partial-update semantics (only passed fields change), immutability of the event name, that unchanged values are reported as no change, and a dry-run plus user-approval workflow. These are exactly the behavioral details an agent needs before invoking a destructive configuration mutation.

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?

Four short sentences, front-loaded with the mutable surface, then constraints, then the dry-run/approval rule. No filler or restatement of the title.

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?

For a 7-parameter destructive mutation with a fully documented schema and an output schema, the description covers the remaining burden: partial-update behavior, immutability, idempotent no-op reporting, and the approval/dry-run workflow. Nothing needed to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds value by clarifying that the event name is immutable (constraining key_event) and that only supplied fields are applied, which explains the interplay of default_value, currency_code, and clear_default_value. It does not add format or validation detail beyond what the schema already documents.

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 gives a specific verb (change), a specific resource (one existing GA4 key event), and enumerates exactly what is mutable: counting method, default value, currency, or clearing the default. It also states the immutable field (event name), which separates it from ga4_mark_key_event / ga4_unmark_key_event without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes the operating context clearly: this applies to an existing key event, and dry_run should be used to preview with user approval before the real call. It does not explicitly exclude or route against sibling tools such as ga4_mark_key_event or ga4_unmark_key_event, so it stops short of full when/when-not guidance.

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