Skip to main content
Glama

Audience overlap

cohort_overlap
Read-only

How many accounts are in every one of 2 to 10 merchant cohorts ("shops at Walmart and Taco Bell and pays for OpenAI"), with that group's transactions and spend at those merchants.

Number cohorts from 1, contiguously; per cohort pass ids_N, canonical_N, names_N, group_N or brand_N, in that precedence. group_N is a merchant group for a cohort of many merchants: lotteries, lotteries-retail, lotteries-online, sportsbooks. brand_N matches merchant names in the directory (walmart is Walmart and nothing else); a term matching more than 50 merchants is refused as too broad. names_N maps a descriptor to its merchant, so one routed through PayPal, Square, Cash App, Shopify, DoorDash or Klarna selects that intermediary's whole customer base: prefer brand_N or ids_N.

An overlap is returned only above 10,000 transactions and 1,000 accounts; below either it comes back suppressed with no figure, and the reply never says which floor was missed. The window snaps to whole months (effective_start_date / effective_end_date) and spans at most six.

This is not a retention or acquisition cohort, it has no metro or state filter, and accounts are not people.

Talk to the user in plain words: no tool, parameter or field names. Say "the American Spend model", never "panel" or a data source.

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": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "cohort_overlap"
  }
}

Input Schema

NameRequiredDescriptionDefault
ids_1NoCanonical merchant UUIDs for cohort 1. Comma-separated or repeated, max 50.
ids_2NoCohort 2 by merchant UUIDs. Same form as `ids_1`.
ids_3NoCohort 3 by merchant UUIDs. Same form as `ids_1`.
ids_4NoCohort 4 by merchant UUIDs. Same form as `ids_1`.
ids_5NoCohort 5 by merchant UUIDs. Same form as `ids_1`.
ids_6NoCohort 6 by merchant UUIDs. Same form as `ids_1`.
ids_7NoCohort 7 by merchant UUIDs. Same form as `ids_1`.
ids_8NoCohort 8 by merchant UUIDs. Same form as `ids_1`.
ids_9NoCohort 9 by merchant UUIDs. Same form as `ids_1`.
ids_10NoCohort 10 by merchant UUIDs. Same form as `ids_1`.
brand_1NoFuzzy match on canonical merchant name for cohort 1 — not raw descriptors. Refused if it matches more than 50 merchants.
brand_2NoCohort 2 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_3NoCohort 3 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_4NoCohort 4 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_5NoCohort 5 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_6NoCohort 6 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_7NoCohort 7 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_8NoCohort 8 by fuzzy match on canonical merchant name. Same form as `brand_1`.
brand_9NoCohort 9 by fuzzy match on canonical merchant name. Same form as `brand_1`.
group_1NoMerchant group for cohort 1, by slug or id. Use it when a cohort is too wide for a brand name, e.g. `lotteries`.
group_2NoCohort 2 by merchant group. Same form as `group_1`.
group_3NoCohort 3 by merchant group. Same form as `group_1`.
group_4NoCohort 4 by merchant group. Same form as `group_1`.
group_5NoCohort 5 by merchant group. Same form as `group_1`.
group_6NoCohort 6 by merchant group. Same form as `group_1`.
group_7NoCohort 7 by merchant group. Same form as `group_1`.
group_8NoCohort 8 by merchant group. Same form as `group_1`.
group_9NoCohort 9 by merchant group. Same form as `group_1`.
names_1NoExact raw descriptors for cohort 1. Comma-separated or repeated, max 50.
names_2NoCohort 2 by exact raw descriptors. Same form as `names_1`.
names_3NoCohort 3 by exact raw descriptors. Same form as `names_1`.
names_4NoCohort 4 by exact raw descriptors. Same form as `names_1`.
names_5NoCohort 5 by exact raw descriptors. Same form as `names_1`.
names_6NoCohort 6 by exact raw descriptors. Same form as `names_1`.
names_7NoCohort 7 by exact raw descriptors. Same form as `names_1`.
names_8NoCohort 8 by exact raw descriptors. Same form as `names_1`.
names_9NoCohort 9 by exact raw descriptors. Same form as `names_1`.
brand_10NoCohort 10 by fuzzy match on canonical merchant name. Same form as `brand_1`.
end_dateYesInclusive ISO-8601 date. At most 366 days after `start_date`.
group_10NoCohort 10 by merchant group. Same form as `group_1`.
names_10NoCohort 10 by exact raw descriptors. Same form as `names_1`.
start_dateYesInclusive ISO-8601 date.
canonical_1NoCanonical merchant name for cohort 1.
canonical_2NoCohort 2 by canonical merchant name. Same form as `canonical_1`.
canonical_3NoCohort 3 by canonical merchant name. Same form as `canonical_1`.
canonical_4NoCohort 4 by canonical merchant name. Same form as `canonical_1`.
canonical_5NoCohort 5 by canonical merchant name. Same form as `canonical_1`.
canonical_6NoCohort 6 by canonical merchant name. Same form as `canonical_1`.
canonical_7NoCohort 7 by canonical merchant name. Same form as `canonical_1`.
canonical_8NoCohort 8 by canonical merchant name. Same form as `canonical_1`.
canonical_9NoCohort 9 by canonical merchant name. Same form as `canonical_1`.
canonical_10NoCohort 10 by canonical merchant name. Same form as `canonical_1`.
include_childrenNoExpand a parent merchant to its sub-brands before matching. **Defaults true.** Merchants merged into the requested one are the same merchant and are always included, whatever this is set to — their history stays under the retired id. Applies to merchants named by id, canonical name, directory brand or group; exact descriptors are matched as given. Expansion fails open: a failed directory lookup expands nothing rather than failing the query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish this is a safe read, but the description contributes substantial behavior the annotations cannot: results are suppressed below 10,000 transactions and 1,000 accounts with no indication of which floor was missed, the date window snaps to whole months and is capped at six, and brand terms matching more than 50 merchants are refused. These are exactly the surprises an agent needs to anticipate and explain to a user.

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-loads the core question and the cohort-indexing rule before the caveats, and the parenthetical example earns its space. A few passages restate schema property descriptions (brand fuzzy-match, >50 merchant refusal), which is mild redundancy across a 53-parameter tool but not damaging.

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 53-parameter, no-output-schema tool this covers the essentials: what the intersection means, how cohorts are addressed and prioritized, suppression floors, and date-window constraints. It gives only a loose sketch of the returned figures and says nothing about response shape or whether results are per-cohort or aggregate, leaving a small gap.

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 100%, so the baseline is 3, but the description adds meaning the schema does not: the precedence order among the five cohort-addressing families, the fact that an intermediary-routed descriptor over-broadens a cohort, and which group slugs exist (lotteries, lotteries-retail, lotteries-online, sportsbooks). It does not explain include_children, whose fail-open expansion behavior lives only in the schema.

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 operation on a specific resource: counting accounts present in every one of 2 to 10 merchant cohorts, along with that group's transactions and spend. The example ("shops at Walmart and Taco Bell and pays for OpenAI") makes the intersection semantics unambiguous and separates it from sibling aggregate tools like cross_shop or breakdown.

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?

Gives strong selection guidance among the parameter families: numbering cohorts contiguously and the precedence ids_N, canonical_N, names_N, group_N/brand_N, plus the explicit advice to prefer brand_N or ids_N over names_N because an intermediary descriptor selects that intermediary's whole customer base. It also rules out misreadings ("not a retention or acquisition cohort, no metro or state filter, accounts are not people"). It stops short of naming a sibling tool to use instead for retention-style or geography questions, so 4 rather than 5.

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.