Skip to main content
Glama

Cohort Retention

get_retention
Read-onlyIdempotent

Calculates weekly cohort retention for a product, showing the share of users active each subsequent week after their first seen week. Groups users by first-seen week with configurable lookback window.

Instructions

Weekly cohort retention for the product: users grouped by first-seen week (one row per cohort, newest last), with the share still active each subsequent week — a lower-triangular grid. Needs product-analytics events flowing; returns empty cohorts when the product has none. window_days default 56 = 8 weekly cohorts (min 7; roughly one extra cohort per added 7 days). product_id optional (primary product when omitted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idNoProduct id, from whoami (optional; the org's primary product when omitted).
window_daysNoLookback window in days (optional; default 56 = 8 weekly cohorts).
Behavior4/5

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

Annotations already indicate read-only and idempotent; the description adds the specific retention structure, window_days meaning, and product_id optionality, providing useful behavioral 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 a single paragraph that efficiently conveys the core concept, structure, and key parameters without fluff. Every sentence adds value.

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 simple parameter set (2 optional params) and no output schema, the description fully covers what the tool does, when to use it, and what to expect. No 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%, but the description adds value by explaining the default window_days in terms of cohorts (56 = 8 weekly) and the optionality of product_id (primary product when omitted).

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 it provides 'weekly cohort retention' with a specific structure ('lower-triangular grid'), and it distinguishes from siblings by its analytic nature (focused on retention metrics).

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 specifies prerequisites ('Needs product-analytics events flowing') and behavior when conditions aren't met ('returns empty cohorts'), providing context for when to use the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIOProductOS/claude-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server