Skip to main content
Glama

Retention

get_retention
Read-onlyIdempotent

Weekly retention cohorts of one app: how many users (or sessions when the app sends no user) come back in the following weeks. Plans without retention answer with an error.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "app_id": "<app_id>"
    },
    "name": "get_retention"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoOptional end (exclusive), RFC 3339 instant with offset; use with from.
fromNoOptional start, RFC 3339 instant with offset (for example 2026-11-01T00:00:00Z); use with to.
app_idYesApp id from list_apps.
periodNotoday, yesterday, 7d, 30d or 90d (UTC days, today included). Ignored when from and to are given.90d
test_modeNotrue reads test (debug) signals only; false (default) reads real signals only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds behavior the annotations cannot: the cohort is weekly, results fall back to sessions when the app sends no user identifiers, and the call errors out on plans without retention. It does not describe response shape or limits on cohort range.

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?

Two sentences, both earning their place. The core purpose is front-loaded and the failure condition follows immediately, with no filler or restatement of the title.

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 conveys what the return represents (week-over-week returning user or session counts). It does not specify row structure or how cohort sizes are reported, but for a read-only metric tool with fully documented parameters this is close to complete.

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 description coverage is 100%, and the schema already explains period, from/to interaction and the test_mode toggle, so parameter semantics are fully carried there. The description adds no syntax or format detail beyond the schema. Baseline 3 is appropriate.

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?

The description names a specific resource and analysis type: weekly retention cohorts of one app, counting users (or sessions as a fallback). That is far more informative than the bare name 'get_retention'. It stops short of contrasting with siblings like get_funnel or get_overview, so an agent must infer the distinction from domain knowledge.

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?

There is no explicit when-to-use / when-not-to-use guidance versus sibling analytics tools. The one real usage constraint given is a prerequisite: 'Plans without retention answer with an error,' which tells the agent this may fail on some accounts. Useful, but the choice of this tool over get_funnel or get_overview is left implicit.

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