Skip to main content
Glama
48x-ai

@marketbasketanalysis/mcp

by 48x-ai

mine_hui_itemsets

Identify which product combinations drive the most profit by mining high-utility itemsets from order data. Returns top-K itemsets ranked by aggregate utility for profit-focused bundle analysis.

Instructions

Run high-utility itemset (HUI) mining on a caller-supplied payload of orders + per-line unit_profit. Returns top-K itemsets ranked by aggregate utility (sum of profit across all occurrences). Use this when an agent needs to evaluate which item combinations drive the most profit (not just frequency) for a specific time window or product subset. Plus or Enterprise tier required on the merchant account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoHow many top-utility itemsets to return. Default 20, max 100.
ordersYesOrder payload: each order has order_id + items[]. Each item has sku, quantity, unit_profit.
min_utilityNoMinimum utility threshold; itemsets below this are dropped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It mentions the Plus or Enterprise tier requirement and the ranked-output behavior, but does not explicitly state whether the operation is read-only, how empty or malformed orders are handled, or how top_k and min_utility interact.

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?

Three tightly written sentences with no filler. The core operation is front-loaded, followed by the output contract, then the appropriate usage context.

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 an analytics tool with a detailed input schema, the description covers the core contract: input payload, profit metric, ranking, and tier requirement. However, there is no output schema and the description does not specify the result shape or edge-case behavior, leaving some ambiguity for an agent deciding how to handle the response.

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?

The input schema already covers 100% of parameters with descriptions, so the baseline is 3. The description adds useful context that utility is the sum of per-line profit and that top-K controls output size, but it does not add meaning for min_utility beyond what the schema already provides.

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?

Opens with a specific verb and resource: 'Run high-utility itemset (HUI) mining' on a caller-supplied payload. It also states the output, top-K itemsets ranked by aggregate utility, and explicitly differentiates from frequency-based analysis with 'not just frequency', which helps distinguish it from sibling analytics tools.

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?

Gives an explicit use condition: evaluate which item combinations drive the most profit for a specific time window or product subset. It provides a negative cue ('not just frequency'), but it does not name sibling alternatives or state when those would be preferred.

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