Skip to main content
Glama

get_customer_insights

Get customer behavior and retention insights. All reports are per-store in multi-store mode — use the store param to target a specific store. Reports: new_vs_returning (revenue/orders/AOV split by first-time vs repeat buyers), repeat_metrics (repeat purchase rate, avg days between purchases, BOTH avgLifetimeValue and medianLifetimeValue, lifetimeValueSkewRatio + distribution note — LEAD WITH MEDIAN when describing 'the typical customer', use mean only when distribution is symmetric; if lifetimeValueDistributionNote is present the mean is misleading), cohorts (monthly acquisition cohorts — counts and aggregate repeat rate), retention_curve (per-cohort cumulative retention % AND LTV at month 1/3/6/12 — the canonical e-commerce LTV view; cohorts that haven't matured to a milestone show null for that milestone, not a fake-low value), by_category (repeat rate by Shopify product_type — requires product_type to be set, returns 'Uncategorized' if not), cohorts_by_first_purchase (cohorts by first product category), top_customers (ranked by LTV or order count), lapsed_high_value (high-spending customers who haven't ordered recently — per-store, ideal for targeted win-back campaigns; rows carry a Shopify-admin adminUrl (this dataset holds no names/emails by design) and customer tags, trade-frequency accounts are flagged likelyWholesale so they're excluded from consumer win-backs, and customers inactive beyond maxDaysInactive (default 365d) are treated as churned and excluded).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoFor top_customers and lapsed_high_value: number of results (default: 20)
monthsNoFor cohorts and retention_curve: number of months to look back for acquisition (default: 6 for cohorts, 12 for retention_curve)
reportYesReport type
sortByNoFor top_customers: sort by totalSpent or orders (default: totalSpent)
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
endDateNoEnd date (YYYY-MM-DD)
minSpentNoFor lapsed_high_value: minimum lifetime spend in major units, e.g. 500 for £500 (default: 500)
startDateNoStart date (YYYY-MM-DD)
daysInactiveNoFor lapsed_high_value: days since last order to count as lapsed (default: 90)
maxDaysInactiveNoFor lapsed_high_value: upper bound on inactivity — customers whose last order is older than this are treated as churned, not lapsed, and excluded (default: 365). Raise to see the long tail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.2/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so richly: per-store scoping in multi-store mode, null (not fake-low) for unmatured cohort milestones, churned customers excluded beyond maxDaysInactive, likelyWholesale flagging, exclusion of names/emails by design, and the warning that the mean is misleading when lifetimeValueDistributionNote is present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the report catalogue is delivered as one enormous run-on sentence that is hard to parse. The content is dense and largely earns its place, but the structure undermines quick scanning.

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?

For a 10-parameter tool with no output schema, the description does a good job describing what each report returns (AOV splits, repeat rate, retention % and LTV at 1/3/6/12 months, adminUrl and tags on lapsed rows). The missing piece is the unexplained store parameter referenced in prose but absent from the schema.

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%, so the schema already documents every parameter including defaults, so the baseline is 3. The description mostly restates schema-level facts (store scoping, defaults) and notably references a 'store param' that does not appear in the input schema, which limits the added value.

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?

States a specific verb+resource ('Get customer behavior and retention insights') and then enumerates all eight report values with the metric each returns, letting an agent distinguish it from get_customers, get_insights, and get_metrics_comparison without opening schemas.

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?

Provides strong per-report usage context ('LEAD WITH MEDIAN when describing the typical customer', 'raise to see the long tail', win-back targeting exclusions). It does not explicitly say when to prefer this tool over sibling tools like get_customers, so it falls short of a full when/alternatives statement.

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