Skip to main content
Glama

BRAINIAC Predictive & Customer Analytics

Market-basket association rules

predictive-analytics_market-basket-rules
Read-onlyIdempotent

Mine frequent itemsets and association rules with support, confidence, lift, leverage and conviction from caller baskets. Price $0.04 USDC. POST /api/v1/predictive-analytics/market-basket-rules. An unpaid call returns the x402 payment terms and does not run.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "baskets": "<baskets>"
    },
    "name": "predictive-analytics_market-basket-rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
basketsYesbaskets, array. Required.
maxRulesNomaxRules, integer, from 1 to 100000. Required.
minSupportNominSupport, number, from any to 1. Required.
minConfidenceNominConfidence, number, from any to 1. Required.
maxItemsetSizeNomaxItemsetSize, integer, from 2 to 10. Required.

Output Schema

NameRequiredDescriptionDefault
rulesNorules. Array.
sourcesNosources. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety bar is covered. The description adds genuinely non-schema behavior: a $0.04 USDC charge and the fact that an unpaid call short-circuits to payment terms rather than executing. Return-shape details are covered by the output schema.

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?

Front-loaded with the core action and metrics, then pricing, endpoint, and payment precondition in short declarative sentences. The endpoint path is arguably redundant for an agent but is compact and harmless.

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 five-parameter statistical tool with full schema coverage, an output schema, and rich annotations, the description covers purpose, metrics, and the payment gate. The main omission is any explanation of input expectations, such as whether baskets must be non-empty or how minSupport interacts with small basket counts.

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 baseline is 3. The description adds conceptual meaning by tying the listed metrics to the mining task, which implies what minSupport and minConfidence control, but it does not explain maxRules or maxItemsetSize 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?

States a specific verb and resource ('Mine frequent itemsets and association rules') plus the exact metrics returned (support, confidence, lift, leverage, conviction) and the input domain ('caller baskets'). This clearly separates it from the regression, clustering, and survival siblings without needing their names.

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?

Gives operational guidance (cost, endpoint, and that an unpaid call returns x402 terms without running) but no guidance on when to choose this tool over alternatives or what data shape makes it appropriate. There are no exclusions or prerequisites about basket input structure.

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