Skip to main content
Glama

BRAINIAC Predictive & Customer Analytics

RFM scoring and named customer segments

predictive-analytics_rfm-segment
Read-onlyIdempotent

Score customers 1–bins on recency, frequency and monetary value with average ranks for ties, then map scores to Champions/Loyal/New/At risk/Hibernating or a custom rule list. Price $0.03 USDC. POST /api/v1/predictive-analytics/rfm-segment. An unpaid call returns the x402 payment terms and does not run.

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": "predictive-analytics_rfm-segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoasOf, string. Optional.
binsNobins, integer, from 3 to 10. Required.
customersNocustomers, array. Optional.
segmentMapNosegmentMap, value. Required.default
transactionsNotransactions, array. Optional.

Output Schema

NameRequiredDescriptionDefault
sourcesNosources. Array.
segmentsNosegments. Array.
customersNocustomers. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds genuinely new behavior: a $0.03 USDC cost, an x402 payment challenge that short-circuits execution when unpaid, and deterministic tie handling via average ranks. It stops short of describing result shape or error behavior, but the output schema covers returns.

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?

Three sentences, front-loaded with the core computation before the pricing and endpoint details. Every sentence carries information; the endpoint path and price are the only parts that could be considered boilerplate but they are operationally relevant.

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?

Given an output schema, rich annotations, and a detailed input schema, the description supplies the missing pieces an agent needs: cost, payment-gate behavior, and aggregation semantics. A brief note on how optional customers and transactions are combined (and what happens if both are omitted, since zero params are required) would make it complete.

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 100% so the baseline is 3, and the description earns above that by explaining semantics the schema cannot: scores span 1 through the bins value, ties are broken with average ranks, and segmentMap accepts either the built-in 'default' mapping or a custom rule list with R/F/M ranges. It does not clarify the relationship between the optional customers and transactions inputs, leaving one meaningful gap.

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 names a specific verb and resource: score customers on recency, frequency and monetary value, then map scores to named segments or a custom rule list. It gives the concrete mechanics (1–bins, average ranks for ties) and the default segment names, so an agent can tell exactly what this does versus the other single-algorithm siblings like kmeans-cluster or clv-bg-nbd.

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?

Usage context is implied through the payment gate ('An unpaid call returns the x402 payment terms and does not run') and the price, which tells the agent what to expect on first call. However, there is no explicit when-to-use versus alternatives guidance and no statement of when this tool is a poor fit compared to other predictive-analytics endpoints.

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