Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Update Event Rule

ga4_update_event_rule
DestructiveIdempotent

Change one existing GA4 event create rule on a web stream of the user's connected Google Analytics property: its destination event, conditions, parameter copying or parameter mutations. Each list passed replaces the rule's list in full; fields not passed stay as they are. Applies to events received from now on. 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>",
      "stream_id": "<stream_id>",
      "rule_id": "<rule_id>"
    },
    "name": "ga4_update_event_rule"
  }
}

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.
rule_idYesThe event create rule id, as ga4_get_tracking_configuration lists it.
stream_idYesThe data stream the rule belongs to: its number or properties/<p>/dataStreams/<number>, as ga4_get_tracking_configuration lists it.
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.
event_conditionsNoNew conditions, replacing all current ones. All must match (AND), 1–10. Include one on eventName, e.g. [{"field":"eventName","comparison_type":"EQUALS","value":"page_view"},{"field":"page_location","comparison_type":"CONTAINS","value":"/thank-you"}].
destination_eventNoNew event name to create.
parameter_mutationsNoNew parameter mutations, replacing all current ones ([] removes them). At most 20. parameter_value may copy another parameter with [[name]]; "" removes the parameter.
source_copy_parametersNoWhether to copy the matching event's parameters.

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.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint, idempotentHint and openWorldHint, so the safety profile is known. The description adds semantics beyond that: each passed list replaces the rule's list in full, unpassed fields are preserved, and the change only affects events received from now on. The additive-vs-replacing behavior and the approval gate are the valuable additions.

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 dense sentences, front-loaded with the verb and resource, followed by replacement semantics and the dry-run/approval workflow. No filler, though 'Changes configuration only after the user approved it' is slightly awkward phrasing rather than elegant constraint statement.

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

Completeness4/5

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

With an output schema present, the description needn't explain return values, and it covers the mutation semantics, temporal scope, and safety workflow that an agent needs to call it correctly. An explicit pointer to the sibling edit-rule tool is the only meaningful gap.

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 100%, so the baseline is 3 and the schema already documents replacement semantics ('replacing all current ones'), enum values, and limits. The description reinforces that lists replace in full while unpassed fields stay, which is useful but largely duplicative of the schema text.

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: 'Change one existing GA4 event create rule on a web stream of the user's connected Google Analytics property', then enumerates the mutable facets (destination event, conditions, parameter copying, parameter mutations). The 'event create rule' scoping distinguishes it from the sibling event edit rule tools 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 Guidelines4/5

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

Gives concrete operational guidance: dry_run previews, and configuration changes only after user approval. It does not explicitly route to ga4_update_event_edit_rule or ga4_create_event_rule as alternatives, so an agent must infer which rule family to pick, but the when-to-use context for this tool is clear.

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