Skip to main content
Glama

Cohort Retention

cohort_retention
Read-onlyIdempotent

Build a retention table and average curve from raw cohort counts. PREMIUM (license).

Typical input {"cohorts": {"2026-01": [1000, 400, 300, 250]}} — index 0 is cohort size, each later index is users still active in that period — returns {"retention_table_pct": {"2026-01": [100.0, 40.0, 30.0, 25.0]}, "avg_curve_pct": [...], "reading": "..."}.

Use when each cohort has counts per period since acquisition. Not for a one-pass funnel (funnel_report). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "cohort '' must map to a list of numbers,"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cohortsYesMapping of cohort label to a list of counts, where counts[0] is the cohort size and counts[n] is users active in period n, e.g. {"2026-01": [1000, 400, 300]}. The first 24 cohorts are used.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint. The description adds the important behavioral detail that errors are never raised as protocol errors but returned as part of the response payload with a fix message. This is critical for agent handling and goes beyond annotation values.

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 concise (4 sentences) and front-loaded with the core purpose. Every sentence serves a distinct role: purpose, example, usage guidance, error behavior. No waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, output schema exists, annotations cover safety), the description covers input format, output structure, usage constraints, error handling, and retry safety. Nothing essential is missing for correct invocation.

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%, so baseline is 3. The description provides an example input and output, reinforcing the schema's explanation of the counts array structure. However, it does not add new semantic information beyond what the schema already describes (e.g., index meaning, 24-cohort limit). The example is illustrative but not semantically novel.

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?

The description clearly states the tool builds a retention table and average curve from raw cohort counts. It distinguishes itself from the sibling tool funnel_report by stating 'Not for a one-pass funnel (funnel_report)', making the purpose unambiguous.

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

Usage Guidelines5/5

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

Explicitly says 'Use when each cohort has counts per period since acquisition' and provides an exclusion 'Not for a one-pass funnel (funnel_report)'. It also notes that errors are returned in-band and that retrying after correction is safe, giving clear usage context.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: A/B testing, cohort retention, correlation, CSV profiling, trend forecasting, funnel analysis, and growth rates. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent lower_snake_case pattern with descriptive names (ab_test, cohort_retention, correlation, csv_profile, forecast_trend, funnel_report, growth_rates). The naming is uniform and predictable.

Tool Count5/5

With 7 tools, the server is well-scoped for a data analysis toolkit. It covers a range of common tasks without being too sparse or overwhelming.

Completeness4/5

The set covers key analysis tasks (A/B test, correlation, cohort retention, funnel, growth, forecast, profiling). However, it lacks a tool for continuous hypothesis testing (e.g., t-test) and basic descriptive statistics, which are minor gaps for the domain.

Resources