Skip to main content
Glama

Customer Intelligence & Segmentation

Server Details

Analyze customer data to make segmentation and predict which customer to focus on for more sales.

Ownership verified
Status
Healthy
Last Tested
Transport
Streamable HTTP
URL
Tool DescriptionsA

Average 4.6/5 across 3 of 3 tools scored.

Server CoherenceA
Disambiguation5/5

Each tool has a distinct, non-overlapping role: customer_tiering performs direct analysis, customer_tiering_get_prep_code generates prep code, and customer_tiering_score_stats validates and scores prepared data. No two tools could be confused for the same action.

Naming Consistency4/5

All tools share the customer_tiering prefix, but the first is a bare noun while the others follow a verb_noun pattern (get_prep_code, score_stats). Slight deviation from a strict verb_noun convention, but the prefix makes the family recognizable.

Tool Count5/5

With 3 tools, the set is tightly scoped to a single domain. Each tool earns its place: the main analysis tool, a code generator, and a validation/scoring tool. This is an ideal size for the stated purpose.

Completeness5/5

The tools cover both a direct path and an optimized sandbox path, with no obvious dead ends. The main tool handles all tiering and decision needs, while the auxiliary tools enable a cheaper alternative without missing functionality.

Available Tools

2 tools
customer_tieringScore Customer Book (A/B/C/D)A
Read-only
Inspect

Scores a customer book of 500 transaction rows OR FEWER into A/B/C/D tiers. Send the rows directly; this server runs the survival model (BG/NBD), spend model (Gamma-Gamma), tier migration, money layer and decision cards, and returns the full result including a per-customer ledger with explanation traces. For books LARGER than 500 rows use customer_tiering_get_engine instead — sending thousands of rows as tool arguments is slow and risks truncated JSON. Optionally accepts rep_contacts, which lets the money layer learn contact uplift from data rather than assuming it. Customer identifiers are CLEANED HERE before scoring: capitalisation, spacing, punctuation, legal-suffix and word-order variants (ACME PVT LTD / Acme Pvt. Ltd. / Acme Private Limited) are merged into one account by rule, so send the values exactly as they appear in the source and do not pre-normalise them. Anything that needs context instead of rules — 'Acme & Co' vs 'Acme Pvt Ltd', a name under two codes — comes back in identity_cleaning.review_candidates, unmerged, for you to judge from the surrounding rows and re-send via identity_overrides. Pass customer_name alongside a coded customer_id to have accounts reported by name.

ParametersJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis date YYYY-MM-DD. Defaults to latest transaction date.
currencyNoISO currency code for money display (e.g. INR, USD, EUR). No FX conversion.USD
rep_contactsNoOptional rep-activity log [{customer_id, date}, ...]. Builds touched vs untouched Markov matrices and learns contact uplift per tier (≥ 10 touched transitions). Observational, not causal.
transactionsYesPurchase rows. Each item needs customer_id, date, and amount (> 0, finite). Send customer_id exactly as the source has it: capitalisation, spacing, punctuation, legal-suffix and word-order variants are merged here by rule. Do not pre-normalise. Add customer_name when the source has a name as well as a code.
horizon_monthsNoCLV projection horizon in months.
currency_symbolNoOverride display symbol (e.g. ₹, $, R$).
identity_overridesNoYour judgement calls on the review_candidates a previous call reported: {raw or reported customer value -> the account it belongs to}. Spelling variants are merged automatically and need no entry here; use this only for groups the rules deliberately left separate, and only after reading the surrounding rows or asking the user.
risk_period_monthsNoWindow over which neglect churn risk is assessed.
include_diagnosticsNoIf true, include MLE params and multi-start fit diagnostics.
rep_queue_max_itemsNoMax length of the daily SAVE/GROW/VERIFY rep queue.
annual_discount_rateNoAnnual discount rate for CLV (e.g. 0.10 = 10%).
assumed_upgrade_probNoFallback P(upgrade | contacted). Used only when learned data from rep_contacts is insufficient for that tier.
contact_effectivenessNoFallback fraction of at-risk churn recovered by one contact. Used only when rep_contacts is missing or too sparse for that tier.
min_customers_for_modelNoBelow this count, BG/NBD refuses to fit.
rep_queue_min_save_revenueNoIgnore SAVE candidates with lifetime revenue below this.
min_repeat_buyers_for_modelNoBelow this repeat-buyer count, BG/NBD refuses to fit.

Output Schema

ParametersJSON Schema
NameRequiredDescription
alertsNoList from the upstream customer tiering API.
statusYes1 = success, 0 = error
messageNo
metadataNoUpstream customer tiering API payload.
customersYesList from the upstream customer tiering API.
decisionsYesRanked plain-language manager cards (CALL NOW / GROW / CHECK). Money, days, account names only — no P(alive) / CLV / RFM jargon.
rep_queueYes
book_summaryNoUpstream customer tiering API payload.
book_exposureNo
uplift_targetsNoList from the upstream customer tiering API.
migration_modelNo
identity_cleaningYesWhat the server did to the customer identifiers before scoring: which spelling variants it merged by rule, which groups it deliberately left separate for YOU to rule on (review_candidates — read the rows and decide, then re-run with identity_overrides), how names were chosen for display, and the counts before and after. Always relay the merges and the open questions; the tiers depend on them.
money_assumptionsNo
data_quality_reportNoUpstream customer tiering API payload.
Behavior5/5

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

Annotations already mark read-only, non-destructive, open-world. The description adds crucial behavioral context: required data sources, returned decision artifacts, 'Observational, not causal' caveat, and the warning 'Do not invent tiers.' No contradiction.

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?

It's a long paragraph but front-loaded with purpose and rich with usable heuristics; no filler. Slightly dense, so 4 rather than 5.

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 15-param tool with output schema, the description covers input expectations, outputs, alternative paths, and data-source compatibility without needing to detail return types.

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 100% and every param has a description. The tool description reinforces key requirements but does not add significant extra semantics beyond what the schema already states.

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 'DEFAULT tool for sales customer-book questions' and enumerates concrete tasks (segment A/B/C/D, call lists, churn, CLV). It explicitly contrasts with sibling tools via the 'do NOT use this tool' path, making purpose distinct.

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

Usage Guidelines5/5

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

It provides an explicit invoke-for list and an explicit when-not-to-use condition with alternative tool names, offering strong usage guidance.

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

customer_tiering_get_engineCustomer Tiering — Get Scoring Script (large books)
Read-only
Inspect

For books LARGER than 500 transaction rows. Returns a complete, runnable Python script that scores the book into A/B/C/D tiers with survival modelling (BG/NBD), spend modelling (Gamma-Gamma), tier migration, a money layer and plain-language decision cards. Run it in your code sandbox against the user's transaction file. The rows never pass through you as tokens, so a 10,000-row book costs the same to run as a 600-row one. Needs numpy. Prints ranked decisions and headline figures; writes the full per-customer ledger to customer_tiering_result.json beside the input file. No customer data reaches this server on this path. SAVE AND RUN THE RETURNED SCRIPT VERBATIM — every block of it is required for the computation. Do not retype it from memory, shorten it, reformat it, split it up, or reimplement the maths with pandas/sklearn; only the PATH / AS_OF / CURRENCY / OUT / OVERRIDES / CONTACTS lines at the bottom may be edited. The script cleans customer identities itself before scoring — merging capitalisation and spelling variants by rule, printing what it merged, and listing the similar-but-unproven groups for you to rule on via OVERRIDES — so do not pre-clean the file or edit those rules. Optionally takes contacts_path, a log of rep calls or visits (customer_id + date only). It is not required and the book scores fine without it, but it is valuable: with it the money layer MEASURES what a contact is worth per tier from touched-vs-untouched tier transitions instead of assuming a flat rate, so ask for it whenever the user mentions a CRM, a call log or a visit register.

ParametersJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis date YYYY-MM-DD. Defaults to latest in file.
currencyNoISO currency code for display (INR, USD, EUR...).USD
file_pathYesPath to the transaction file (CSV/TSV/JSON) inside your sandbox. The file needs one row per PURCHASE with three things: a customer identifier, a date, and an amount > 0. Column names are matched flexibly (customer_id / AccountId / Party Name; date / invoice_date / Invoice Date; amount / revenue / Invoice Amount), so most CRM and Excel exports work unchanged, including a separate name column used to label accounts when the id is a code. A pre-aggregated per-customer summary will NOT work — the models need purchase timing. The script cleans name variants itself ('Acme Pvt Ltd' and 'ACME PVT LTD' become one account), so pass the file as it is.
contacts_pathNoOptional path to a rep-contact log (CSV/TSV/JSON) inside your sandbox: one row per call, visit or WhatsApp touch, needing only a customer identifier and a date — no amount. Column names are matched as leniently as the transaction file, and the ids go through the same identity cleaning, so a log spelling 'ACME PVT LTD.' still joins 'Acme Pvt Ltd'. Strictly optional; without it the book scores exactly as it would anyway. With it, what a contact is worth stops being an assumed flat rate and is MEASURED per tier by comparing tier transitions that followed a contact against those that did not (any tier with at least 10 touched transitions; thinner tiers keep the assumption). Worth asking for whenever the user mentions a CRM, a call log or a visit register.

Output Schema

ParametersJSON Schema
NameRequiredDescription
notesNo
scriptYesThe runnable scoring script.
currencyNo
languageNo
requiresNo
writes_fileNo
instructionsYes
code_integrityYesRules for running the script: it must be saved and executed verbatim, which lines may be edited, why every block matters, and how to verify the copy is intact.
engine_versionYes
file_path_usedNo
scipy_requiredNo
data_requirementsNoWhat the input file must contain: required fields and their accepted aliases, formats handled, minimum data volumes, and what will not work.
identity_cleaningYesHow the script cleans customer identities before scoring: which variants it merges by rule, which similar-but-unproven groups it leaves for the caller to judge and how to feed that decision back via OVERRIDES, how accounts get their display names, and what it writes out.
contacts_path_usedNo
network_access_requiredNo

Frequently Asked Questions

Discussions

No comments yet. Be the first to start the discussion!

Related MCP Connectors

Related MCP Servers

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources