Skip to main content
Glama

GA4: run retention (cohort) report

ga4_run_cohort_report
Read-onlyIdempotent

Retention for a GA4 property (properties/): people grouped by day, week (Sunday to Saturday) or month of first visit, not sign-up, and how many were active in each later period; one still running is marked incomplete. first_channel or google_ads_campaign keeps people that channel or campaign first brought; split_by="channel" puts paid channels beside the largest others.

Tools revision: 5c9bea8f.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cohortsNoHow many groups, 1 to 12.
propertyYes
split_byNo"channel": one table per first channel. Every paid channel is kept whatever its size, then the largest others, 8 tables at most; the rest are counted in a note.
granularityNoWEEKLY
first_channelNoA default channel group exactly as Analytics names it, such as "Paid Search".
follow_periodsNoLater periods to report for each group, 1 to 12 (30 when DAILY).
last_cohort_endNoYYYY-MM-DD. The newest group is the last whole day, week or month ending on or before it; by default the newest one that is over.
google_ads_campaignNoA Google Ads campaign name exactly as written; Analytics knows it once linked to Google Ads.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the description is not required to carry the safety profile. It adds useful behavioral context beyond annotations: cohort grouping is by first visit rather than sign-up, the newest running cohort is marked incomplete, and split_by can produce up to eight channel tables with overflow noted.

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 description is front-loaded with the core retention/cohort concept and then explains the key filtering/splitting behaviors efficiently. The appended revision line adds little value for an agent deciding how to invoke the tool, but the substantive text is dense and well organized.

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 an eight-parameter report tool with an output schema and read-only annotations, the description gives enough context to understand the report model, first-touch filtering, split behavior, and incomplete cohort marking. Remaining parameter details are mostly covered by schema descriptions, so no critical invocation information appears 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 75%, and the description adds meaningful semantics for key parameters beyond the schema: first_channel and google_ads_campaign restrict to users first brought by that channel/campaign, and split_by="channel" keeps paid channels beside the largest others. It does not elaborate on cohorts, follow_periods, granularity, or last_cohort_end, but those are reasonably documented in the schema descriptions.

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 clearly states that this is a GA4 cohort/retention report, explaining that users are grouped by first-visit period and measured for activity in later periods. It is specific enough to distinguish the resource and report type, though it does not explicitly contrast itself with sibling GA4 report tools such as ga4_run_report or ga4_run_funnel_report.

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 stated purpose: this tool is for retention/cohort analysis. The description mentions filters like first_channel and google_ads_campaign and explains split_by behavior, but it gives no explicit when-to-use guidance or alternative-tool routing against the other GA4 report siblings.

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