Skip to main content
Glama
Shopify Analytics MCP Server

Shopify Analytics MCP Server

by DrMatrixx

get_customer_rfm_segments

Segment customers by Recency, Frequency, and Monetary value to identify Champions, Loyal, At Risk, Lost, and other groups for targeted retention and win-back actions.

Instructions

Segment customers by Recency, Frequency, and Monetary value (RFM analysis). Identifies Champions, Loyal, At Risk, Lost, and other segments.

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_customer_rfm_segments"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoDate range for analysis (default: last_12m). Supports: last_7d, last_30d, last_90d, last_12m, this_year, last_year, or YYYY-MM-DD:YYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does add real value by disclosing the output taxonomy (Champions, Loyal, At Risk, Lost), which tells the agent what categorization to expect. However, it never states that this is a read-only operation, nor whether the result is a per-customer segment assignment, aggregate counts per segment, or a scored list, which are material behavioral questions for a customer-segmentation query.

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

Conciseness4/5

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

Two short sentences, front-loaded with the core operation and followed by the output taxonomy. No filler or repetition. It could carry slightly more density without becoming bloated, but nothing needs to be cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-optional-parameter read tool with full schema coverage and no output schema, the description covers the what but leaves the shape of the result ambiguous. Whether the tool returns one row per customer or one row per segment is information an agent needs before choosing it over a summary-style sibling, and that is not stated.

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 single period parameter is fully documented in the schema with its default and all supported values, so the baseline is 3. The description adds nothing about the period parameter, such as how it affects Recency calculation, but the schema already does the heavy lifting.

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 analysis verb and resource: segmenting customers by Recency, Frequency, and Monetary value, and it enumerates the resulting segment labels (Champions, Loyal, At Risk, Lost). That makes the tool's function unambiguous. It does not, however, distinguish it from the many adjacent customer tools such as get_customer_churn_risk, get_customer_ltv_summary, or get_customer_health_report, so the sibling boundary is left implicit.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no stated prerequisites, and no mention of when a different customer-analysis tool would be more appropriate. An agent must infer from the name alone that this is the RFM option among several customer-analytics siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.