Skip to main content
Glama

Get cohorts and LTV

get_cohorts
Read-onlyIdempotent

Cohort & LTV analytics. A cohort is everything that entered on the same day (or week): subject=clicks follows a traffic day — cumulative LTV/ROI per click, repeat conversions and how much of the payoff had landed by day N, with revenue attributed back to the day of the CLICK (standard reports attribute it to the day the conversion arrived); subject=registration follows sign-ups (Lead) to their deposits; subject=ftd follows first deposits (Sale) to their redeposits (Upsell) — the deposit / repeat-purchase vocabulary: summary.arpu = LTV per FTD, returns_per_entity = redeposits per FTD, active_rate = FTD→redeposit rate, summary.ladder = LTV earned inside D0 / D1-7 / D8-30 / D31-90, life_days = redeposits by day of life; subject=push follows a subscriber base; subject=pwa follows PWA installs. split_by returns a second table whose rows are one dimension value instead of a day (each row carries its own ladder, active_rate and returns_per_entity — the channel comparison). Cells a cohort has not reached yet are null.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_cohorts"
  }
}

Input Schema

NameRequiredDescriptionDefault
osNo
ispNo
pwaNoPWA id
cityNo
siteNoPlacement / zone id as passed by the ad network
sub1NoFilter by sub1
sub2NoFilter by sub2
sub3NoFilter by sub3
sub4NoFilter by sub4
sub5NoFilter by sub5
sub6NoFilter by sub6
sub7NoFilter by sub7
sub8NoFilter by sub8
sub9NoFilter by sub9
userNoWorkspace member id(s), comma-separated — the campaign owner at click time (needs the "See statistics per team member" permission; ignored otherwise)
offerNoOffer id
sub10NoFilter by sub10
sub11NoFilter by sub11
sub12NoFilter by sub12
sub13NoFilter by sub13
sub14NoFilter by sub14
sub15NoFilter by sub15
deviceNomobile / tablet / desktop
periodNoReporting period (default 7days). Use 'custom' with date_from/date_to.
sourceNoTraffic source id
browserNo
countryNoCountry ISO alpha-2 code, e.g. ES
date_toNoYYYY-MM-DD (with period=custom)
horizonNoDays/weeks after the cohort day to return (default 30 / 12, max 90 / 26)
landingNoLanding id
subjectNoWhat a cohort is made of (default clicks)
campaignNoCampaign ALIAS (the short code, not the numeric id)
creativeNoCreative id from the click URL
languageNo
pwa_tagsNoComma-separated tag ids — pwas carrying any of them
referrerNo
split_byNoAlso return a matrix whose rows are this dimension
utm_termNoExact utm_term value from the click URL
date_fromNoYYYY-MM-DD (with period=custom)
pwa_groupNoPwa group id
smartlinkNoSmartlink id
source_idNoSource id as passed by the ad network
offer_tagsNoComma-separated tag ids — offers carrying any of them
utm_mediumNoExact utm_medium value from the click URL
utm_sourceNoExact utm_source value from the click URL
ad_campaignNoThe ad network's own campaign id (external_campaign_id)
aff_networkNoAffiliate network id
granularityNoCohort granularity (default day)
offer_groupNoOffer group id
source_tagsNoComma-separated tag ids — sources carrying any of them
unique_onlyNoCount unique clicks only
utm_contentNoExact utm_content value from the click URL
exclude_botsNoExclude bot traffic (bots are counted by default)
landing_tagsNoComma-separated tag ids — landings carrying any of them
source_groupNoSource group id
utm_campaignNoExact utm_campaign value from the click URL
campaign_tagsNoComma-separated tag ids — campaigns carrying any of them
landing_groupNoLanding group id
campaign_groupNoCampaign group id
smartlink_tagsNoComma-separated tag ids — smartlinks carrying any of them
connection_typeNo
smartlink_groupNoSmartlink group id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / period / enum
      Previous value: -[
      -  "today",
      -  "yesterday",
      -  "7days",
      -  "30days",
      -  "this_month",
      -  "last_month",
      -  "custom"
      -]New value: +[
      +  "today",
      +  "yesterday",
      +  "7days",
      +  "30days",
      +  "60days",
      +  "90days",
      +  "this_month",
      +  "last_month",
      +  "custom"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered; the description adds real behavior beyond that — revenue is attributed to the click day rather than the conversion day, unreached cohort cells are returned as null, and split_by produces a second table with its own ladder/active_rate/returns_per_entity. It does not mention cardinality, cost, or any permission caveats in prose.

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?

It is front-loaded with a two-word purpose statement and then packs subject semantics, attribution rules, metric vocabulary and split_by behavior into one dense paragraph with no filler. The em-dash-heavy run-on structure makes it harder to scan than it could be for a 62-parameter tool, but nothing is redundant.

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 62-parameter tool with no output schema, the description supplies the conceptual model an agent needs: cohort definition, subject routing, attribution semantics, null-cell behavior and the meaning of the returned metric fields. Gaps remain around limiting/pagination and how granularity interacts with horizon, but nothing critical to a correct first call is 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 89%, so the baseline is 3, but the description goes further by explaining what each subject value means analytically and what split_by changes about the returned rows. It also glosses the metric names (summary.arpu = LTV per FTD, returns_per_entity = redeposits per FTD, active_rate, summary.ladder, life_days), which the schema does not define. Horizon's meaning is only implied ('how much of the payoff had landed by day N').

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 'Cohort & LTV analytics' and then defines precisely what a cohort is for each subject value (clicks, registration, ftd, push, pwa), so an agent knows this tool returns cohort-based LTV/ROI tables rather than flat statistics. It does not name a sibling (e.g. get_statistics or get_report) to contrast against, which keeps it just short of a 5.

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 clear scenario routing: choose subject=clicks for per-click LTV, subject=registration to follow Lead→deposit, subject=ftd for the deposit/repeat-purchase vocabulary, and split_by to get a per-dimension comparison table. That is strong contextual guidance, but it never states when not to use this tool or which sibling to prefer.

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