Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Run Funnel Report

ga4_run_funnel_report
Read-onlyIdempotent

Run a Google Analytics funnel report on one GA4 property of the user's connected Google Analytics login: an ordered list of steps (events, page conditions or parameter conditions) and how many users completed each one and dropped off between them, optionally broken down by a dimension (device, country) and with the next action users take after a step. Returns the funnel table and, when present, the visualization table, each as one object per row keyed by Google's dimension and metric names. Read-only; uses the Data API alpha surface.

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>",
      "funnel_steps": "<funnel_steps>"
    },
    "name": "ga4_run_funnel_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
segmentsNoOptional Data API Segment objects applied to the funnel; see https://developers.google.com/analytics/devguides/reporting/data/v1/funnels#segments.
date_rangesNoDate ranges to report on, each {startDate, endDate, name?}. Dates are YYYY-MM-DD or relative: today, yesterday, NdaysAgo. Examples: a single month [{"startDate":"2025-01-01","endDate":"2025-01-31","name":"Jan2025"}]; the previous 30 days [{"startDate":"30daysAgo","endDate":"yesterday"}]; two ranges to compare [{"startDate":"2025-01-01","endDate":"2025-01-31"},{"startDate":"2025-02-01","endDate":"2025-02-28"}].
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.
funnel_stepsYesOrdered funnel steps. Each is {name, event} for a single event ({"name":"Session start","event":"session_start"}) or {name, filterExpression} for anything else. Examples: several events {"name":"Purchase","filterExpression":{"orGroup":{"expressions":[{"funnelEventFilter":{"eventName":"purchase"}},{"funnelEventFilter":{"eventName":"in_app_purchase"}}]}}}; a dimension condition {"name":"Organic visitors","filterExpression":{"funnelFieldFilter":{"fieldName":"firstUserMedium","stringFilter":{"matchType":"CONTAINS","caseSensitive":false,"value":"organic"}}}}; an event with a parameter condition {"name":"Add to cart over 50","filterExpression":{"funnelEventFilter":{"eventName":"add_to_cart","funnelParameterFilterExpression":{"funnelParameterFilter":{"eventParameterName":"value","numericFilter":{"operation":"GREATER_THAN","value":{"doubleValue":50}}}}}}}; event AND page {"name":"Home page view","filterExpression":{"andGroup":{"expressions":[{"funnelEventFilter":{"eventName":"page_view"}},{"funnelFieldFilter":{"fieldName":"pageLocation","stringFilter":{"matchType":"CONTAINS","value":"/"}}}]}}}. A typical e-commerce funnel: first_open/first_visit → session_start → page_view → add_to_cart → purchase.
funnel_breakdownNoSplits each step by a dimension: {"breakdownDimension":"deviceCategory"}. Common: deviceCategory, country, operatingSystem, browser.
funnel_next_actionNoWhat users do after a step: {"nextActionDimension":"eventName","limit":5}. Common dimensions: eventName, pagePath.
return_property_quotaNoTrue to include the property's remaining Data API quota in the reply.

Output Schema

NameRequiredDescriptionDefault
propertyYesproperties/<number>.
stepCountYesSteps in the funnel as sent.
funnelTableNoThe funnel table, flattened like a report, or null.
propertyQuotaNoRemaining quota when return_property_quota was true, else null.
funnelVisualizationNoThe visualization table, flattened like a report, or null.

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 cover the safety profile (readOnly, idempotent, non-destructive, open world), and the description adds genuinely new context: the returned funnel and visualization tables keyed by Google's dimension/metric names, and that it runs on the Data API alpha surface, which signals possible instability.

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 purpose and the step model are front-loaded in one dense sentence, followed by a short return-format sentence. It is well-structured with no filler, though the first sentence is long enough to be slightly demanding to parse.

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 return values needn't be re-explained, and the description still covers the response shape, the alpha-surface caveat and the quota flag. Minor gaps remain, such as funnel step-count limits and error behavior, but nothing an agent needs to invoke it is missing.

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% and the parameter descriptions carry extensive examples, so the baseline is 3. The description does paraphrase the optional breakdown-by-dimension and next-action behaviors, but adds no syntax or constraint detail beyond what the schema already supplies.

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 ('Run a Google Analytics funnel report on one GA4 property') and defines the output shape (completion and drop-off per ordered step), which cleanly separates it from the generic ga4_run_report, ga4_run_conversions_report and ga4_run_realtime_report siblings.

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 by the funnel-step model and the prerequisite that property_id must come from ga4_get_account_summaries, but there is no explicit 'use this instead of ga4_run_report when...' guidance or any exclusion, leaving the sibling routing to inference.

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