Skip to main content
Glama

Birinchi Shop — CPA partner API

Cohort analysis

get_cohorts
Read-onlyIdempotent

Cohort analysis: orders grouped by the week they were created (Asia/Tashkent, Monday start), newest first, with how many were delivered within 3, 7, 14 and 30 days of creation (count and rate_percent). A window is null while the cohort is too young (not 0%). meta.average = weighted average over complete cohorts. Use it to see how fast orders turn into sales and whether recent weeks are better or worse. Default: last 12 weeks. Example: {"weeks": 8, "source": "meta_ads"}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_cohorts"
  }
}

Input Schema

NameRequiredDescriptionDefault
weeksNo
sourceNoOnly orders from this source (same as order.source).
link_idNoOnly this tracking link.
offer_idNoOnly this offer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish a safe read-only, idempotent operation, and the description adds substantial behavioral detail beyond them: timezone, Monday week start, newest-first ordering, null handling for immature cohorts, and the meaning of meta.average. This directly prevents misinterpretation of zero versus null and clarifies aggregation semantics.

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 front-loaded with the core purpose, then immediately explains output semantics and usage context. The example is compact and reinforces parameter use without unnecessary repetition.

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?

For a read-only analytics tool with no output schema, the description successfully explains what the output represents, including rates, null windows, and weighted averages. It also supplies usage context and a concrete example, leaving little ambiguity for invoking the tool correctly.

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 75%, and the schema already documents source, link_id, and offer_id. The description adds the useful default of last 12 weeks and an example using weeks and source, but it mostly repeats the schema default and does not further explain filtering parameters.

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 opens with a specific verb and resource: cohort analysis of orders grouped by creation week. It immediately distinguishes this from general stats or insights tools by describing the exact cohort metric (delivered within 3, 7, 14, and 30 days) and ordering.

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 gives clear usage context: 'Use it to see how fast orders turn into sales and whether recent weeks are better or worse,' plus a default of last 12 weeks. It does not explicitly name alternatives such as get_stats or get_insights, but the intended use case is clear.

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