Skip to main content
Glama

Customer Cohort Analysis

get_cohort_analysis
Read-onlyIdempotent

Get customer cohort analysis showing LTV, repeat purchase rate, and revenue by cohort month/week over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYesMetric to track per cohort period: 'ltv' and 'revenue' both show accumulated revenue per customer over time, 'repeat_rate' shows the repurchase rate.
periodYesCohort grouping granularity: group customers by acquisition month or acquisition week.
cohort_end_dateYesEnd of the cohort acquisition window in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).
cohort_start_dateYesStart of the cohort acquisition window in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
matrixNoCohort-by-period grid, truncated to the first 10 cohorts and 12 periods to stay inside the response limit. cohort_labels and period_headers are NOT truncated, so index past those bounds is absent by design, not missing data.
metricNo
periodNo
summaryNo
_messageNo
metadataNo
_truncatedNo
period_unitNo
cohort_labelsNo
period_headersNo
_tenant_contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the 'over time' aspect and the cohort month/week grouping, which is somewhat behavioral. However, it does not disclose additional details such as pagination, result limits, or handling of missing data. Given annotations, this is acceptable but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no redundant words. It front-loads the core action and immediately lists the key output metrics and grouping options. Every element earns its place, and there is no filler.

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?

Given that an output schema exists (which presumably describes the return format), the description does not need to explain return values. The essential aspects for calling the tool—what it returns and the parameters—are covered by the schema. The description provides a clear high-level overview. The only minor gap is the lack of explicit usage context, but for a read-only query tool with rich schema and annotations, this is adequate.

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 description coverage is 100%, so all parameters are already documented in the input schema. The description only reiterates the metric names and period granularity, which are already present in the schema's enum descriptions. It adds no new semantic information beyond what the schema provides, so the baseline score of 3 is appropriate.

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 the verb 'Get' and the resource 'customer cohort analysis', and lists the key metrics (LTV, repeat purchase rate, revenue) and time granularity (month/week). It is specific and unambiguous, but it does not explicitly differentiate from sibling tools like get_ltv_summary or run_repeat_purchase_rate, which could overlap in purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. For example, it does not explain when to prefer cohort analysis over a simple LTV summary or repeat rate report, nor does it mention any prerequisites or context. The agent is left to infer usage from the tool name and schema.

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