Skip to main content
Glama

SaaS Pro Max

Get retention

get_retention
Read-onlyIdempotent

Action-based retention in daily, weekly or monthly cohorts. First matching starts use retained history; recurring mode admits a visitor once per period. Incomplete cells have complete=false and do not represent a completed retention period.

Input Schema

NameRequiredDescriptionDefault
appYesApplication id, or orgSlug/appSlug as returned by list_apps
modeNo
eventNoCount only this event as activity
rangeNoTime range: 24h, 7d, 30d, 90d, 12m, or custom:YYYY-MM-DD..YYYY-MM-DD. Defaults to 7d.
filtersNoNarrow the read to exact values, as "dimension:value" pairs, e.g. ["country:DE", "source:google"]. Dimensions are the ones get_breakdown accepts and the first colon ends the dimension. Filters are combined with AND, cover at most the last 90 days, and the answer carries capped: true when the range had to be shortened.
cohortByNo
startEventNoStarting action; empty means any event
environmentNoEnvironment slug: production, staging or development. Defaults to production.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds genuinely non-obvious behavior: incomplete cells carry complete=false and don't represent a finished period. It does not mention rate limits or the default cohort/range behavior beyond what the schema states.

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?

Three short sentences, zero redundancy, with the core cohort behavior front-loaded ahead of the edge-case caveat about complete=false.

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?

With no output schema, the description still flags the two contract-level facts an agent needs (complete=false cells, capped filters). It stops short of describing cohort structure or default range behavior, which would make the return values fully predictable.

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 75%, so the baseline is 3; the description earns above that by explaining what the mode enum actually means (first match uses retained history, recurring admits once per period) and tying incomplete cells to the output. startEvent, cohortBy and environment are left entirely to the schema.

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?

States the resource and analytic shape precisely: 'Action-based retention in daily, weekly or monthly cohorts', which distinguishes it from metrics/timeseries siblings. It never explicitly names an alternative or states the boundary vs get_funnel_results or get_active_users, so a 4 rather than 5.

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

Usage Guidelines3/5

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

Explains the two cohort modes but never says when to choose retention over a funnel or active-users query, nor when first vs recurring applies. Usage is implied by the mode semantics rather than given as guidance.

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