Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Update Enhanced Measurement

ga4_update_enhanced_measurement
DestructiveIdempotent

Turn GA4 enhanced measurement on or off for one web stream of the user's connected Google Analytics property, or individual automatic events: scrolls, outbound clicks, site search (and its query parameters), form interactions, file downloads, video engagement, page changes. Only the settings passed change; unchanged values are a no-op. Takes effect for new hits; no website 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>",
      "stream_id": "<stream_id>"
    },
    "name": "ga4_update_enhanced_measurement"
  }
}

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.
stream_idYesThe data stream to configure (a web stream): 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.
stream_enabledNoMaster switch for all enhanced measurement events.
scrolls_enabledNoscroll events at 90% depth.
site_search_enabledNoview_search_results events.
uri_query_parameterNoComma-separated extra URL parameters for site-search categories.
page_changes_enabledNopage_view on browser history changes.
file_downloads_enabledNofile_download events.
search_query_parameterNoComma-separated URL parameters holding the site-search term, e.g. q,s,search.
outbound_clicks_enabledNoclick events on links to other domains.
video_engagement_enabledNoEmbedded YouTube video events.
form_interactions_enabledNoform_start and form_submit events.

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

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description earns credit for adding real behavior: 'Only the settings passed change; unchanged values are a no-op', 'Takes effect for new hits; no website change', and that dry_run reads and reports field-level changes without writing. These materially clarify the effect radius that the annotations alone do not convey, with no contradiction of the destructive hint.

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 action and scope are front-loaded, and the dense event list is efficient rather than padded. The single long run-on sentence carrying all the caveats (no-op, new hits only, dry_run, approval) is slightly harder to parse than a split structure would be, but no sentence is wasted.

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?

For a 13-parameter mutation tool with an output schema, the description covers the essentials an agent needs: partial-update semantics, effective timing (new hits, no site change), and the preview/approval workflow. Only permission requirements and the sequential relationship with the listing tools are left unstated.

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 schema already documents every parameter including dry_run semantics and the query-parameter fields. The description's enumeration of the automatic events mirrors the parameter names rather than adding new meaning beyond what the schema provides.

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 opens with a specific verb and resource ('Turn GA4 enhanced measurement on or off for one web stream') and then enumerates the individual sub-settings (scrolls, outbound clicks, site search, form interactions, downloads, video, page changes), which pins down the exact scope. It does not name a sibling such as ga4_update_web_stream or ga4_get_tracking_configuration, so the boundary with the general web-stream updater is left implicit.

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 supplies a clear operating procedure: 'dry_run previews' and 'Changes configuration only after the user approved it', which tells the agent to preview and get consent before mutating. What is missing is explicit routing guidance — when to use this instead of ga4_update_web_stream or ga4_get_tracking_configuration is never stated.

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