Skip to main content
Glama

Basket and free-shipping threshold

get_basket
Read-onlyIdempotent

What an online order holds, and the free-shipping threshold the store's own orders show: avgSubtotal and percentiles of the CART SUBTOTAL (after discounts, before returns, tax as the store shows prices — the figure a free-shipping rate is checked against; NOT net revenue, so never call it AOV: for AOV on net revenue use get_summary), itemsPerOrder (shares of orders with 1, 2, 3, 4+ units and the mean), freeShippingShare, and threshold: the lowest round subtotal from which orders stopped paying shipping, with how cleanly the orders split (freeAboveShare, paidBelowShare) and near — the orders within 20% under it, their mean gap and the shipping they paid. The threshold is READ FROM THE ORDERS, not from the store's settings: say "your orders show free shipping from about €X", never "your threshold is". thresholdReason says why there is none (always_free, never_free, no_clear_threshold, too_few_orders). Online orders in the store's currency only. Without dates it reads the last 60 days, the span stated in window. Use for questions about basket size, units per order, free shipping, or how many orders fall just short of it. It never estimates what changing the threshold would earn: Nuira has no figure for how shoppers would react. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the last 60 days; a named month or two dates the operator gave MUST be sent here.

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": "get_basket"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period."New value: +"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
    • changedInput schema / properties / to / description
      Previous value: -"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period."New value: +"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, closed-world), and the description goes well beyond them: the threshold is derived from orders rather than store settings, the required phrasing ('your orders show free shipping from about €X', never 'your threshold is'), currency/scope limits ('Online orders in the store's currency only'), the default window reported in `window`, and the enumerated thresholdReason failure modes. That is exactly the interpretive context an agent needs to report results without overclaiming.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence front-loads the subject correctly, but the body is a single ~200-word block dense with nested parentheticals, em-dashes, backticked field names and all-caps emphasis, which makes it slow to parse. Several clauses (the schema-repeated date rules, the 'never call it AOV' repetition of the same distinction) could be cut without losing information.

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?

There is no output schema, so the description carries the return-value burden and does so thoroughly: it names each returned field, explains what threshold means and how it is derived, and enumerates all thresholdReason values (always_free, never_free, no_clear_threshold, too_few_orders). It also declares the default time window and the currency scope, leaving no major ambiguity for a two-parameter read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the two date parameters are already fully documented, and the description largely repeats 'both or neither, never after today'. Worse, it states 'Without dates it reads the last 60 days', while the schema says the default is the operator's on-screen period or else the last 30 days — a direct conflict that can cause an agent to mis-describe or mis-select the default window. The one genuinely additive point ('MUST be sent here' when the operator names dates) does not offset that error.

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 the exact resource (an online order's basket) and enumerates the concrete outputs: avgSubtotal and its percentiles, itemsPerOrder unit shares, freeShippingShare, threshold, and thresholdReason. It also explicitly differentiates itself from the sibling get_summary ('NOT net revenue, so never call it AOV: for AOV on net revenue use get_summary'), so an agent can route between the two without opening either schema.

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 positive triggers ('Use for questions about basket size, units per order, free shipping, or how many orders fall just short of it'), an explicit exclusion with the alternative tool named (AOV/net revenue → get_summary), and a hard out-of-scope boundary ('It never estimates what changing the threshold would earn'). It even states a routing rule for the optional dates: 'a named month or two dates the operator gave MUST be sent here.'

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