Skip to main content
Glama

Split one shopping list across two or three shops

split_order
Read-only

Answer 'can I save by ordering from more than one shop?' for a whole list. Returns which items to buy where, each leg's own subtotal, delivery fee and service fee, the combined delivered total, and what it saves against buying everything in one order. Every fee is a published one: a leg whose delivery fee we could not verify is never put in a split, because a split is a recommendation to pay a SECOND fee and it may not rest on a number we would refuse to quote for one order. reason='cheaper' means one order could buy this list and two buy it for materially less. reason='more_of_the_list' means no single storefront stocks everything, so the second order fills the gap: it costs MORE, saving is negative, and that is the honest answer rather than a hidden one. Say which of the two it is. Each leg carries its own handoffUrl, one page per order. Give the shopper both. Every leg meets its own storefront's minimum order, so both legs are placeable as they stand. Returns splitOrder: null when one order is the right answer, which is the usual case — report that plainly and point at the single-order recommendation instead of retrying. optimize_delivery already returns the same splitOrder field, so call this one only when the shopper asks about splitting specifically, or to raise max_stores to 3.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityNoCity name in Hebrew or English. Enough for chains that publish a settlement list, not enough for a storefront whose area is a polygon or a depot radius.
nearNo'lat,lng' string, e.g. '32.078,34.774'. Do not combine with address.
itemsYesThe shopping list, same shape as optimize_delivery.
intentNoThe shopper's own framing of this shop, in their own words, e.g. 'ברביקיו ל-12 אנשים'. Not a summary of the item list. Shown on each leg's handoff page next to what was priced. Optional; omit rather than inventing one.
addressNoDelivery address in Israel, free text, e.g. 'מנדלסון 1, תל אביב'. Preferred: some storefronts publish a service area that only a street address can be tested against.
slot_typeNostandard (default) or pickup.
max_storesNoHow many storefronts to spread the list over. Default 2. A third adds a third delivery fee, so it only wins when it reaches items the other two do not stock.
membershipsNoMemberships the shopper holds, e.g. ['credit_card', 'wolt_plus'].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / city / minLength
      Added value: +1
    • addedInput schema / properties / near / minLength
      Added value: +3
  2. Changed1 schema field changed
    • changedInput schema / properties / items / items / properties / pack_qty / type
      Previous value: -"number"New value: +"integer"
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources