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.9/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description reinforces this by stating 'every call is read-only and idempotent' and adds details about error response format and retry safety, providing context beyond annotations.

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 compact yet comprehensive, with a clear structure: purpose, example, usage guidance, error handling, and idempotency. Every sentence contributes meaning without redundancy.

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 one parameter with full schema coverage, an output schema (referenced), nested objects, and a complex use case, the description covers input/output format, constraints (first 24 cohorts), and error behavior, leaving no critical gaps.

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% with a detailed description of the 'cohorts' parameter. The description adds value by giving a concrete input example and showing the expected output, slightly exceeding the baseline of 3.

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 specifies the verb 'build' and resources 'retention table and average curve' from 'raw cohort counts'. It provides an explicit input/output example and distinguishes from sibling tool 'funnel_report' by stating it is not for a one-pass funnel.

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?

It clearly states when to use (each cohort has counts per period since acquisition) and when not to use (not for a one-pass funnel), naming 'funnel_report' as alternative. It also explains error handling behavior, enabling safe retry.

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.8/5.0
Disambiguation5/5

Each tool addresses a distinct analytical task: A/B test, cohort retention, correlation, CSV profiling, forecasting, funnel analysis, and growth rates. There is no overlap, and the descriptions clearly state when to use each and what not to use it for.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with descriptive noun_noun combinations (e.g., ab_test, cohort_retention, growth_rates). No mixing of conventions or vague verbs.

Tool Count5/5

7 tools is a well-scoped set for a data analysis server. It covers a range of common statistical and data profiling tasks without being overwhelming or too sparse.

Completeness4/5

The tool surface covers core analytical needs: hypothesis testing, retention analysis, correlation, data profiling, forecasting, funnel analysis, and growth rates. Minor gaps exist (e.g., no general descriptive statistics beyond CSV profiling, no regression), but the set feels intentional and sufficient for typical data desk queries.

Resources