Shopeak
Developers / Tools reference

Shopeak MCP

Tools reference

All 17 tools the Shopeak MCP server offers, with their inputs and outputs. Assistants see the same names, descriptions and schemas when they connect.

Conventions#

  • IDs come from earlier results. A store_id, product_id or variant_id should always come from a previous tool result, never be guessed.
  • Prices are in major units of the store’s currency, so 3499.5 means KES 3,499.50. Show display_price exactly as given.
  • Every result has two parts: short Markdown text for the model, with images where useful, and structuredContent that matches the tool’s outputSchema. The fields below describe the structured part.
  • Errors are tool results with isError: true and a plain-English message, such as “quantity must be between 1 and 100”. The message says what to do next.
  • Optional fields are left out of results when they’re empty.

Annotations

Each tool carries MCP annotations, which clients use to decide when to ask the shopper for approval. The badges on this page show them:

  • Read-only: readOnlyHint: true. Doesn’t change anything on Shopeak or in the cart.
  • Session cart: works on this session’s private cart. Nothing changes on Shopeak.
  • Creates an order: destructiveHint: true. Only create_checkout has it. Keep approval on for it.
  • Idempotent: idempotentHint: true. Repeating the call with the same arguments has no further effect.

All tools#

ToolGroupWhat it does
search_productsDiscoverySearch products across all stores or one store
list_store_productsDiscoveryBrowse one store’s catalog
get_productDiscoveryFull details, variants and policies for a product
compare_productsDiscoveryCompare two to five products
list_storesDiscoveryFind stores by name, category, city or country
get_storeDiscoveryA store’s profile and policies
get_shipping_optionsDiscoveryDelivery options, prices and tax for a city
recommend_productsRecommendationsRanked product picks for a need and budget
recommend_storesRecommendationsRanked store picks for a need
add_to_cartCartAdd a product to the cart
view_cartCartThe cart, grouped by store, with fresh prices
update_cart_itemCartChange an item’s quantity
remove_from_cartCartRemove an item
clear_cartCartEmpty the cart, or one store’s items
prepare_checkoutCheckoutA five-minute quote for one store
create_checkoutCheckoutCreate the order and payment link
get_payment_statusCheckoutCheck whether an order is paid

Shared objects#

Objects that several tools return.

ProductCard

A compact product, returned by the search, listing, comparison and recommendation tools.

FieldTypeDescription
product_idstringUse with get_product and the cart tools.
store_idstringThe store that sells it.
store_namestringThe store’s name.
store_verifiedbooleanWhether the store is a verified business. Same meaning as verified on a StoreCard.
titlestringThe product title.
brandstringThe brand, if set.
pricenumberLowest price you can buy it for, in major units of currency.
compare_at_pricenumberThe price before a discount.
currencystringISO code, such as KES.
display_pricestringThe price to show, such as KES 3,499.00. Starts with “from” when variants have different prices.
image_urlstringThe main image.
in_stockbooleanWhether any stock is left.
purchasablebooleantrue only when the store is live. false when it can’t take real online orders right now.
store_statusstringlive, no_payments, paused or practice. See Availability.
ratingnumberAverage rating, out of 5.
rating_countintegerNumber of ratings.
sold_countintegerNumber sold.
free_shippingbooleanWhether delivery is free.
has_variantsbooleanIf true, a variant_id is needed to add it to the cart.

Variant

One buyable option of a product, returned by get_product.

FieldTypeDescription
variant_idstringPass to add_to_cart.
namestringThe variant’s name, such as a size or colour.
optionsobjectOption values, such as {"Size": "42"}.
pricenumberPrice in major units.
display_pricestringThe price to show.
in_stockbooleanWhether any stock is left.
stock_leftintegerOnly present when 10 or fewer are left.
image_urlstringThe variant’s image, if it has one.

StoreCard

A compact store, returned by the store tools.

FieldTypeDescription
store_idstringUse with the store, product, shipping and cart tools.
namestringThe store’s name.
verifiedbooleantrue when Shopeak has checked the identity of the business owner. You can show a checkmark for it. It doesn’t vouch for products or delivery, and false means the store isn’t currently verified; the reason is not public. Ratings and online payments don’t imply verification.
taglinestringA short tagline.
descriptionstringPlain-text description.
categorystringThe store’s main category. Often empty.
citystringWhere the store is based. Often empty.
countrystringThe store’s country.
currencystringThe currency it prices in.
ratingnumberAverage store rating, out of 5.
rating_countintegerNumber of reviews.
logo_urlstringThe store’s logo.
website_urlstringThe store’s own Shopeak website, on its custom domain or myshopeak.com address. Always an https link. Omitted when the store has no website.
contact_emailstringOptional customer contact email, matching Seller Settings > General > Store contact details.
contact_phonestringOptional customer contact phone from the same settings. Never inferred from login or payout phones.
whatsapp_numberstringThe store's public WhatsApp number, if configured.
whatsapp_urlstringOptional https://wa.me/ click-to-chat link for a usable international number. No country prefix is guessed. Opening it does not automatically send a message.
accepts_online_paymentsbooleanWhether the store can take online payments.

Policies

A store’s policies, as written by the store.

FieldTypeDescription
refundstringRefund policy.
returnstringReturn policy.
shippingstringShipping policy.
return_window_daysintegerDays allowed for returns.
exchange_allowedbooleanWhether exchanges are allowed.

CartChange

Returned by every tool that changes the cart.

FieldTypeDescription
messagestringWhat happened, such as “Removed 2 line(s).”
lineobjectThe affected item: store_id, product_id, variant_id, title and quantity.
cart_line_countintegerDifferent items in the cart.
cart_item_countintegerTotal quantity in the cart.

Checkout result

Returned by create_checkout and get_payment_status.

FieldTypeDescription
checkout_idstringThe checkout, the same as the order ID.
order_idstringThe Shopeak order.
order_numberstringThe order number the shopper sees.
store_idstringThe store.
payment_providerstringpaystack
payment_methodstringmpesa or card.
statusstringSuch as pending or paid. Only paid confirms payment.
payment_urlstringA secure https://checkout.paystack.com link for the shopper.
failure_reasonstringWhy a payment failed, if it did.
messagestringWhat to tell the shopper next.
replayedbooleantrue when this is the saved result of an earlier call.
poll_after_secondsintegerWhen payment is still in progress, how long to wait before checking again.

Discovery#

Find products and stores, read details and policies, and check delivery.

Searches products across every Shopeak store, or inside one store when store_id is set. It matches words in titles, descriptions and tags. If the whole phrase finds nothing, it retries with the individual words, so plurals such as lemons work. Out-of-stock products and products from stores that can’t take real orders are hidden unless include_unavailable is true, and notes says how many were left out.

Inputs

NameTypeDescription
queryRequiredstringWhat to look for, such as running shoes. Up to 200 characters.
store_idOptionalstringOnly search inside this store.
min_priceOptionalnumberLowest price, in the store’s currency.
max_priceOptionalnumberHighest price, in the store’s currency.
limitOptionalintegerNumber of results. Default 10, maximum 20.
include_unavailableOptionalbooleanAlso return out-of-stock products and products from stores that can’t take real orders: stores without online payments, paused stores and practice stores. Each product’s store_status says which.

Returns

FieldTypeDescription
productsProductCard[]Matching products. See ProductCard.
totalintegerNumber of matches before the availability and price filters.
notesstring[]Optional. Explains what was left out and why, whether a search fell back to individual words, and what to try when nothing matched.

Browses one store’s catalog page by page, with optional collection, price and sort filters. Unlike search_products, nothing is hidden: out-of-stock products are included, so check in_stock, and so are products of stores that can’t take real orders, so check purchasable and store_status.

Inputs

NameTypeDescription
store_idRequiredstringThe store to browse.
collection_idOptionalstringOnly products in this collection. Collection IDs come from the REST API’s collections endpoint. If the collection doesn’t exist or isn’t published, the filter is ignored and the whole catalog comes back.
sortOptionalstringOne of newest (default), oldest, price_asc, price_desc, title_asc or title_desc.
min_priceOptionalnumberLowest price, in the store’s currency.
max_priceOptionalnumberHighest price, in the store’s currency.
pageOptionalintegerPage number, starting at 1.
limitOptionalintegerNumber of results. Default 10, maximum 20.

Returns

The same shape as search_products: products, total (all matching products in the store) and optional notes.

get_product

Read-only

Gets everything about one product: description, all images, variants with prices and stock, warranty, return policy and the store’s policies. Call it before add_to_cart when a product has variants.

Inputs

NameTypeDescription
store_idRequiredstringThe product’s store.
product_idRequiredstringFrom a search, listing or recommendation result.

Returns

FieldTypeDescription
productProductCardProductCard
descriptionstringPlain text, up to 1,500 characters.
highlightsstring[]Key selling points.
image_urlsstring[]Every product image.
variantsVariant[]Buyable options, such as sizes or colours. See Variant.
attributesobjectSpecifications as name and value pairs.
conditionstringCondition, as set by the store.
min_order_qtyintegerSmallest quantity per order.
max_order_qtyintegerLargest quantity per order.
stock_leftintegerOnly present when 10 or fewer are left.
warrantystringWarranty terms.
return_policystringReturn policy for this product.
ships_fromstringWhere the product ships from.
store_policiesPoliciesPolicies

Compares two to five products side by side on price, rating, availability, warranty and returns. The products can come from different stores.

Inputs

NameTypeDescription
itemsRequiredobject[]Two to five { store_id, product_id } objects.

Returns

FieldTypeDescription
productsobject[]One entry per product, with product (ProductCard), store_rating, condition, warranty, return_window_days and attributes.
cheapest_product_idstringThe product with the lowest price.
top_rated_product_idstringThe product with the best rating.

list_stores

Read-only

Lists Shopeak stores, filtered by name, category, city or country. By default only stores that have set up online payments are listed; pass include_unavailable as true to include the rest. Practice stores and paused stores are never listed. Many stores haven’t recorded a city or category, and filters skip them, so an empty list doesn’t mean a store doesn’t exist. notes says what was left out.

Inputs

NameTypeDescription
queryOptionalstringMatched against each store’s name, tagline, description and category. Many stores leave these blank, so use search_products to find stores by what they sell.
cityOptionalstringSuch as Nairobi. Must match exactly, ignoring case. Stores that haven’t recorded a city are skipped.
countryOptionalstringSuch as Kenya. Must match exactly, ignoring case.
include_unavailableOptionalbooleanAlso list stores that haven’t set up online payments.
pageOptionalintegerPage number, starting at 1.
limitOptionalintegerNumber of results. Default 10, maximum 20.

Returns

FieldTypeDescription
storesStoreCard[]StoreCard
totalintegerNumber of matching stores.
pageintegerThe current page.
total_pagesintegerNumber of pages.
notesstring[]Explains what the list leaves out, so a short or empty list isn’t mistaken for “no such store exists”.

get_store

Read-only

Gets a store’s profile, with its banner and its return, refund and shipping policies. It works for any store, including paused and practice stores, and reports the store’s status.

Inputs

NameTypeDescription
store_idRequiredstringFrom list_stores or any product.

Returns

FieldTypeDescription
storeStoreCardStoreCard
statusstringlive, no_payments, paused or practice. See Availability.
banner_urlstringThe store’s banner image.
policiesPoliciesPolicies
purchasablebooleantrue only when status is live. false means the store can’t take online orders right now. Shoppers can still browse it.

Gets a store’s delivery options for a city, with prices, estimated delivery times and tax details. Pass the exact option name to prepare_checkout as shipping_method.

Inputs

NameTypeDescription
store_idRequiredstringThe store that ships.
cityRequiredstringThe delivery city.
countryOptionalstringThe delivery country.
country_codeOptionalstringISO country code, such as KE.
subtotalOptionalnumberThe cart subtotal for this store. Some stores offer free delivery above a certain amount.

Returns

FieldTypeDescription
optionsobject[]Each has name, rate, display_rate, estimated_days and requires_quote. An empty list means the store doesn’t deliver there.
tax_namestringSuch as VAT, when the store charges tax.
tax_ratenumberA percentage, such as 16.
tax_includedbooleantrue when prices already include tax.

Recommendations#

Rank products or stores for a need, with a score and reasons for each pick.

Recommends products for a plain-language need, such as “a laptop for university”. It considers only in-stock products from stores that can take orders, and ranks them by relevance, ratings, store reputation, price, discounts, popularity, free shipping, returns and warranty. Ratings are smoothed so a single review can’t dominate.

Inputs

NameTypeDescription
needRequiredstringWhat the shopper wants, in their own words.
budget_maxOptionalnumberThe most the shopper wants to pay per item.
budget_minOptionalnumberThe least they want to pay per item.
currencyOptionalstringCurrency of the budget. Default KES. When a budget is set, products priced in other currencies are left out.
store_idOptionalstringOnly recommend from this store.
limitOptionalintegerNumber of results. Default 10, maximum 20.

Returns

FieldTypeDescription
recommendationsobject[]Best first. Each has product (ProductCard), a score from 0 to 100 and reasons, a list of short explanations.
consideredintegerHow many candidate products were scored.
notesstring[]Optional. Explains what was left out, such as products over budget.

Recommends stores for a need by matching each store’s name, category, tagline and description, then ranking by reputation and, if given, the shopper’s city. Only stores that can take online payments are included.

Inputs

NameTypeDescription
needRequiredstringWhat the shopper wants to buy, or the kind of store they want.
cityOptionalstringPrefer stores in this city.
countryOptionalstringOnly include stores in this country.
limitOptionalintegerNumber of results. Default 10, maximum 20.

Returns

FieldTypeDescription
recommendationsobject[]Best first. Each has store (StoreCard), a score from 0 to 100 and reasons.

Cart#

Each MCP session has its own private cart on the server. Cart tools never change anything on Shopeak.

add_to_cart

Session cart

Adds a product to the session’s cart after checking the store, variant, stock and order limits. If the item is already in the cart, its quantity goes up. It fails with a plain-English reason if the store isn’t live, such as a practice store that only takes test payments.

Inputs

NameTypeDescription
store_idRequiredstringThe product’s store.
product_idRequiredstringThe product to add.
variant_idOptionalstringRequired when the product has variants. Get it from get_product.
quantityOptionalintegerHow many to add, from 1 to 100. Default 1.

Returns

view_cart

Read-onlySession cart

Shows the cart grouped by store, with fresh prices, images and subtotals, and flags items that can no longer be bought. Each store is checked out as a separate order.

Inputs

This tool takes no inputs.

Returns

FieldTypeDescription
storesobject[]One entry per store in the cart. See below.
item_countintegerTotal quantity across all stores.
notesstring[]Optional. General notes about the cart.

Each store

FieldTypeDescription
store_idstringThe store.
store_namestringThe store’s name.
currencystringThe store’s currency.
linesobject[]The items from this store. See below.
subtotalnumberTotal for the available items.
display_subtotalstringFormatted subtotal.
savingsnumberDiscount compared with full prices.
ready_for_checkoutbooleanfalse when something must be fixed first.
issuesstring[]What must be fixed, if anything.

Each line

FieldTypeDescription
product_idstringThe product.
variant_idstringThe variant, if any.
titlestringThe product title.
variant_namestringThe variant’s name, if any.
image_urlstringProduct or variant image.
quantityintegerHow many.
unit_pricenumberCurrent price for one.
line_totalnumberUnit price × quantity.
display_unit_pricestringFormatted unit price.
display_line_totalstringFormatted line total.
discountedbooleanWhether a discount applies.
availablebooleanfalse when the item can’t be bought as it is.
issuestringWhy the item isn’t available.

update_cart_item

Session cart

Changes the quantity of an item that’s already in the cart. A quantity of 0 removes it.

Inputs

NameTypeDescription
store_idRequiredstringThe item’s store.
product_idRequiredstringThe item’s product.
variant_idOptionalstringRequired if the item was added with a variant.
quantityRequiredintegerThe new quantity, up to 100. 0 removes the item.

Returns

remove_from_cart

Session cart

Removes one item from the cart.

Inputs

NameTypeDescription
store_idRequiredstringThe item’s store.
product_idRequiredstringThe item’s product.
variant_idOptionalstringRequired if the item was added with a variant.

Returns

clear_cart

Session cart

Empties the cart, or removes only one store’s items when store_id is set. After an order is paid, call it with that store’s store_id.

Inputs

NameTypeDescription
store_idOptionalstringOnly remove this store’s items. Leave it out to empty the whole cart.

Returns

Checkout#

Quote, confirm and pay for one store’s items as a guest, through Paystack.

Get the shopper’s approval

Never call create_checkout until the shopper has seen the full quote and approved the exact amount. The guest checkout guide walks through the whole flow.

Gets a five-minute quote for one store’s cart items and the shopper’s delivery details. It doesn’t create an order or charge anything. Show the full quote and get the shopper’s approval before calling create_checkout.

Inputs

NameTypeDescription
store_idRequiredstringThe store to check out.
emailRequiredstringThe shopper’s email.
full_nameRequiredstringThe recipient’s name.
phoneRequiredstringThe recipient’s phone.
shipping_addressRequiredobjectNeeds address_line_1, city and country. Can also have address_line_2, state, postal_code, country_code, latitude and longitude.
shipping_methodRequiredstringThe exact option name from get_shipping_options.
payment_methodOptionalstringmpesa (default) or card. Both are paid on Paystack.
coupon_codeOptionalstringA store coupon.
notesOptionalstringA note for the store.

Returns

FieldTypeDescription
checkout_idstringPass this to create_checkout. It becomes the order ID.
pricingobjectitems, currency, subtotal, shipping, tax, discount, service_fee, tip, total, charge_currency (always KES) and charge_amount_cents.
display_chargestringThe exact amount to show the shopper.
expires_atstringWhen the quote expires, in RFC 3339 format.
requires_confirmationbooleanAlways true.

It also echoes the store, recipient, address, shipping method, payment method and payment_provider (paystack). See the checkout guide for a full example.

create_checkout

Creates an orderIdempotent

Creates the quoted order and its Paystack payment link. Call it only after the shopper approves the exact amount. Calling it again with the same checkout_id never creates a second order.

Inputs

NameTypeDescription
checkout_idRequiredstringFrom prepare_checkout.
confirmedRequiredbooleantrue, only after the shopper approved this exact quote.
confirmed_amount_centsRequiredintegerThe approved charge_amount_cents from the quote.
confirmed_currencyRequiredstringThe approved charge currency, KES.

Returns

A checkout result with the payment_url to give the shopper.

Checks the payment status of a checkout created in this session. Only paid confirms payment. Wait at least 3 seconds between checks.

Inputs

NameTypeDescription
checkout_idRequiredstringFrom prepare_checkout.

Returns

Questions or feedback about these docs? Email info@shopeak.co.ke.