Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Create Web Stream

ga4_create_web_stream
Idempotent

Create a web data stream in one GA4 property of the user's connected Google Analytics login and return its stream id and G- measurement id. If the property already has a web stream for the same site, nothing is created and that stream is returned. It does not install the Google tag: the site (or its Tag Manager container) must send data to the measurement id before GA4 collects anything. 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>",
      "default_uri": "<default_uri>"
    },
    "name": "ga4_create_web_stream"
  }
}

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.
default_uriYesThe website address, e.g. https://www.example.com.
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.
display_nameNoStream name; defaults to the site's host.

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.
measurementIdNoThe stream's G- measurement id, once it exists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses the idempotent dedupe semantics (same-site web stream is returned, nothing created), the crucial post-condition that the Google tag is NOT installed and the site/Tag Manager must be configured separately, and the approval gate before a non-dry-run call. It does not mention permissions, quota, or propagation timing, but the important behavioral surprises are covered.

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?

Front-loaded with purpose and return values, then caveats; no filler sentences. The fragment "dry_run previews." is terse to the point of being slightly clipped, and the final sentence about approval reads awkwardly, but overall it is efficient.

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?

An output schema exists, so return values need not be explained in depth, and the description still names the two ids the agent will receive. Combined with the dedupe rule, the tag-installation caveat, the dry_run workflow, and the property_id provenance, an agent has everything needed to call this correctly.

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 coverage is 100%, so all four parameters are already documented, including defaults for dry_run and display_name. The description adds only marginal meaning, mainly tying default_uri's site to the dedupe rule; baseline 3 applies when the schema does the heavy lifting.

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?

"Create a web data stream in one GA4 property" names a specific verb and resource, and the return contract (stream id + G- measurement id) is stated up front. The create-vs-update distinction from ga4_update_web_stream is implicit in the verb and reinforced by the dedupe rule for existing streams.

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 gives a clear precondition set: the property_id must come from ga4_get_account_summaries, dry_run previews changes, and the real call happens only after user approval. It does not explicitly name ga4_update_web_stream or ga4_get_tracking_configuration as alternatives when a stream already exists, leaving that routing to the agent.

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