Skip to main content
Glama

get_retention

View weekly cohort retention for a product: users grouped by first-seen week, with the share returning each subsequent week. Requires product analytics events.

Instructions

Weekly cohort retention for the product: users grouped by their first-seen week, with the share returning each week after. Read-only; needs product analytics events flowing, and returns empty cohorts when the product has none. Optional product_id (defaults to the primary product) and window_days (default 56 = 8 weekly cohorts).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idNoProduct id, from whoami (optional; primary by default).
window_daysNoWindow in days (default 56 = 8 weekly cohorts).
Behavior3/5

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

Without annotations, the description carries the full burden. It discloses the read-only nature and the condition for empty results, which are important behavioral traits. However, it does not mention performance, rate limits, or the exact format of the output (e.g., whether it returns percentages or counts). This is adequate 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 two sentences with no filler. The first sentence defines the tool's purpose, and the second covers parameters and behavior. Every sentence earns its place, and the structure is front-loaded for quick understanding.

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 the low complexity (2 parameters, no output schema, no annotations), the description covers the purpose, parameters with defaults, and a behavioral note about empty cohorts. However, it does not describe the return format, which could be helpful for an agent interpreting the result. This is a minor gap.

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 the baseline is 3. The description repeats the parameter defaults already present in the schema ('defaults to the primary product', 'default 56 = 8 weekly cohorts') without adding new semantic information beyond what the schema provides. Hence, no extra value added.

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 defines the tool as providing weekly cohort retention with a specific metric: users grouped by first-seen week and share returning each week. This verb+resource combination is distinct from sibling tools like analyze_funnel or analyze_nps, leaving no ambiguity about what the tool computes.

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?

The description states the prerequisite ('needs product analytics events flowing') and the edge case ('returns empty cohorts when the product has none'), providing good context for when to use the tool. It also explains default behavior for both parameters. However, it does not explicitly compare to alternatives or specify when not to use it, though the unique metric makes this less critical.

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