Skip to main content
Glama

marketbasketanalysis-mcp

get_bundle_for_cart

Read-onlyIdempotent

Given a list of products already in the cart, recommend products that frequently bundle with the cart to complete a high-confidence bundle. This is multi-item basket analysis for cart completion. Use when the user describes a multi-item cart and asks 'what else do I need?', 'what completes this set?', 'what's missing from this bundle?', 'recommend add-ons for this cart', or similar. Different from get_recommendations: this takes MULTIPLE products and returns items that pair with the cart as a whole, not single-item pairings.

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": {
      "product_ids": "<product_ids>"
    },
    "name": "get_bundle_for_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax suggestions to return. Default 3, max 6.
product_idsYesList of product ids currently in the cart (numeric or GID/SKU).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

The annotations already establish read-only, idempotent, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds useful semantic context about multi-item basket analysis, but it does not disclose return format, pagination, confidence behavior, or other operational details beyond the annotations.

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?

The definition is front-loaded with purpose, then clarifies method, usage triggers, and sibling differentiation. The example phrasings are useful for routing and do not make the description feel padded.

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 simple read-only recommendation tool with fully documented parameters and clear annotations, the description provides enough context to select and invoke it correctly. No output schema exists, but the description sufficiently explains that it returns recommended bundle-completing products.

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 parameter documentation already carries the meaning of product_ids and limit. The description reinforces that the input is a list of products currently in the cart, but it adds no syntax, format, or constraint details beyond the schema.

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 states a specific verb and resource: recommend products that frequently bundle with a multi-item cart. It clearly distinguishes the tool from get_recommendations by emphasizing multiple products and whole-cart pairing rather than single-item pairings.

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 gives explicit when-to-use guidance with user phrasings such as 'what else do I need?' and 'what completes this set?'. It also names the key alternative, get_recommendations, and explains the condition that selects this tool instead.

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