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_idorvariant_idshould always come from a previous tool result, never be guessed. - Prices are in major units of the store’s currency, so
3499.5means KES 3,499.50. Showdisplay_priceexactly as given. - Every result has two parts: short Markdown text for the model, with images where useful, and
structuredContentthat matches the tool’soutputSchema. The fields below describe the structured part. - Errors are tool results with
isError: trueand 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. Onlycreate_checkouthas it. Keep approval on for it. - Idempotent:
idempotentHint: true. Repeating the call with the same arguments has no further effect.
All tools#
| Tool | Group | What it does |
|---|---|---|
| search_products | Discovery | Search products across all stores or one store |
| list_store_products | Discovery | Browse one store’s catalog |
| get_product | Discovery | Full details, variants and policies for a product |
| compare_products | Discovery | Compare two to five products |
| list_stores | Discovery | Find stores by name, category, city or country |
| get_store | Discovery | A store’s profile and policies |
| get_shipping_options | Discovery | Delivery options, prices and tax for a city |
| recommend_products | Recommendations | Ranked product picks for a need and budget |
| recommend_stores | Recommendations | Ranked store picks for a need |
| add_to_cart | Cart | Add a product to the cart |
| view_cart | Cart | The cart, grouped by store, with fresh prices |
| update_cart_item | Cart | Change an item’s quantity |
| remove_from_cart | Cart | Remove an item |
| clear_cart | Cart | Empty the cart, or one store’s items |
| prepare_checkout | Checkout | A five-minute quote for one store |
| create_checkout | Checkout | Create the order and payment link |
| get_payment_status | Checkout | Check 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.
| Field | Type | Description |
|---|---|---|
product_id | string | Use with get_product and the cart tools. |
store_id | string | The store that sells it. |
store_name | string | The store’s name. |
store_verified | boolean | Whether the store is a verified business. Same meaning as verified on a StoreCard. |
title | string | The product title. |
brand | string | The brand, if set. |
price | number | Lowest price you can buy it for, in major units of currency. |
compare_at_price | number | The price before a discount. |
currency | string | ISO code, such as KES. |
display_price | string | The price to show, such as KES 3,499.00. Starts with “from” when variants have different prices. |
image_url | string | The main image. |
in_stock | boolean | Whether any stock is left. |
purchasable | boolean | true only when the store is live. false when it can’t take real online orders right now. |
store_status | string | live, no_payments, paused or practice. See Availability. |
rating | number | Average rating, out of 5. |
rating_count | integer | Number of ratings. |
sold_count | integer | Number sold. |
free_shipping | boolean | Whether delivery is free. |
has_variants | boolean | If true, a variant_id is needed to add it to the cart. |
Variant
One buyable option of a product, returned by get_product.
| Field | Type | Description |
|---|---|---|
variant_id | string | Pass to add_to_cart. |
name | string | The variant’s name, such as a size or colour. |
options | object | Option values, such as {"Size": "42"}. |
price | number | Price in major units. |
display_price | string | The price to show. |
in_stock | boolean | Whether any stock is left. |
stock_left | integer | Only present when 10 or fewer are left. |
image_url | string | The variant’s image, if it has one. |
StoreCard
A compact store, returned by the store tools.
| Field | Type | Description |
|---|---|---|
store_id | string | Use with the store, product, shipping and cart tools. |
name | string | The store’s name. |
verified | boolean | true 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. |
tagline | string | A short tagline. |
description | string | Plain-text description. |
category | string | The store’s main category. Often empty. |
city | string | Where the store is based. Often empty. |
country | string | The store’s country. |
currency | string | The currency it prices in. |
rating | number | Average store rating, out of 5. |
rating_count | integer | Number of reviews. |
logo_url | string | The store’s logo. |
website_url | string | The 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_email | string | Optional customer contact email, matching Seller Settings > General > Store contact details. |
contact_phone | string | Optional customer contact phone from the same settings. Never inferred from login or payout phones. |
whatsapp_number | string | The store's public WhatsApp number, if configured. |
whatsapp_url | string | Optional 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_payments | boolean | Whether the store can take online payments. |
Policies
A store’s policies, as written by the store.
| Field | Type | Description |
|---|---|---|
refund | string | Refund policy. |
return | string | Return policy. |
shipping | string | Shipping policy. |
return_window_days | integer | Days allowed for returns. |
exchange_allowed | boolean | Whether exchanges are allowed. |
CartChange
Returned by every tool that changes the cart.
| Field | Type | Description |
|---|---|---|
message | string | What happened, such as “Removed 2 line(s).” |
line | object | The affected item: store_id, product_id, variant_id, title and quantity. |
cart_line_count | integer | Different items in the cart. |
cart_item_count | integer | Total quantity in the cart. |
Checkout result
Returned by create_checkout and get_payment_status.
| Field | Type | Description |
|---|---|---|
checkout_id | string | The checkout, the same as the order ID. |
order_id | string | The Shopeak order. |
order_number | string | The order number the shopper sees. |
store_id | string | The store. |
payment_provider | string | paystack |
payment_method | string | mpesa or card. |
status | string | Such as pending or paid. Only paid confirms payment. |
payment_url | string | A secure https://checkout.paystack.com link for the shopper. |
failure_reason | string | Why a payment failed, if it did. |
message | string | What to tell the shopper next. |
replayed | boolean | true when this is the saved result of an earlier call. |
poll_after_seconds | integer | When payment is still in progress, how long to wait before checking again. |
Discovery#
Find products and stores, read details and policies, and check delivery.
search_products
Read-onlySearches 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
| Name | Type | Description |
|---|---|---|
queryRequired | string | What to look for, such as running shoes. Up to 200 characters. |
store_idOptional | string | Only search inside this store. |
min_priceOptional | number | Lowest price, in the store’s currency. |
max_priceOptional | number | Highest price, in the store’s currency. |
limitOptional | integer | Number of results. Default 10, maximum 20. |
include_unavailableOptional | boolean | Also 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
| Field | Type | Description |
|---|---|---|
products | ProductCard[] | Matching products. See ProductCard. |
total | integer | Number of matches before the availability and price filters. |
notes | string[] | Optional. Explains what was left out and why, whether a search fell back to individual words, and what to try when nothing matched. |
list_store_products
Read-onlyBrowses 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The store to browse. |
collection_idOptional | string | Only 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. |
sortOptional | string | One of newest (default), oldest, price_asc, price_desc, title_asc or title_desc. |
min_priceOptional | number | Lowest price, in the store’s currency. |
max_priceOptional | number | Highest price, in the store’s currency. |
pageOptional | integer | Page number, starting at 1. |
limitOptional | integer | Number 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-onlyGets 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The product’s store. |
product_idRequired | string | From a search, listing or recommendation result. |
Returns
| Field | Type | Description |
|---|---|---|
product | ProductCard | ProductCard |
description | string | Plain text, up to 1,500 characters. |
highlights | string[] | Key selling points. |
image_urls | string[] | Every product image. |
variants | Variant[] | Buyable options, such as sizes or colours. See Variant. |
attributes | object | Specifications as name and value pairs. |
condition | string | Condition, as set by the store. |
min_order_qty | integer | Smallest quantity per order. |
max_order_qty | integer | Largest quantity per order. |
stock_left | integer | Only present when 10 or fewer are left. |
warranty | string | Warranty terms. |
return_policy | string | Return policy for this product. |
ships_from | string | Where the product ships from. |
store_policies | Policies | Policies |
compare_products
Read-onlyCompares two to five products side by side on price, rating, availability, warranty and returns. The products can come from different stores.
Inputs
| Name | Type | Description |
|---|---|---|
itemsRequired | object[] | Two to five { store_id, product_id } objects. |
Returns
| Field | Type | Description |
|---|---|---|
products | object[] | One entry per product, with product (ProductCard), store_rating, condition, warranty, return_window_days and attributes. |
cheapest_product_id | string | The product with the lowest price. |
top_rated_product_id | string | The product with the best rating. |
list_stores
Read-onlyLists 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
| Name | Type | Description |
|---|---|---|
queryOptional | string | Matched 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. |
cityOptional | string | Such as Nairobi. Must match exactly, ignoring case. Stores that haven’t recorded a city are skipped. |
countryOptional | string | Such as Kenya. Must match exactly, ignoring case. |
include_unavailableOptional | boolean | Also list stores that haven’t set up online payments. |
pageOptional | integer | Page number, starting at 1. |
limitOptional | integer | Number of results. Default 10, maximum 20. |
Returns
| Field | Type | Description |
|---|---|---|
stores | StoreCard[] | StoreCard |
total | integer | Number of matching stores. |
page | integer | The current page. |
total_pages | integer | Number of pages. |
notes | string[] | Explains what the list leaves out, so a short or empty list isn’t mistaken for “no such store exists”. |
get_store
Read-onlyGets 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | From list_stores or any product. |
Returns
| Field | Type | Description |
|---|---|---|
store | StoreCard | StoreCard |
status | string | live, no_payments, paused or practice. See Availability. |
banner_url | string | The store’s banner image. |
policies | Policies | Policies |
purchasable | boolean | true only when status is live. false means the store can’t take online orders right now. Shoppers can still browse it. |
get_shipping_options
Read-onlyGets 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The store that ships. |
cityRequired | string | The delivery city. |
countryOptional | string | The delivery country. |
country_codeOptional | string | ISO country code, such as KE. |
subtotalOptional | number | The cart subtotal for this store. Some stores offer free delivery above a certain amount. |
Returns
| Field | Type | Description |
|---|---|---|
options | object[] | Each has name, rate, display_rate, estimated_days and requires_quote. An empty list means the store doesn’t deliver there. |
tax_name | string | Such as VAT, when the store charges tax. |
tax_rate | number | A percentage, such as 16. |
tax_included | boolean | true when prices already include tax. |
Recommendations#
Rank products or stores for a need, with a score and reasons for each pick.
recommend_products
Read-onlyRecommends 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
| Name | Type | Description |
|---|---|---|
needRequired | string | What the shopper wants, in their own words. |
budget_maxOptional | number | The most the shopper wants to pay per item. |
budget_minOptional | number | The least they want to pay per item. |
currencyOptional | string | Currency of the budget. Default KES. When a budget is set, products priced in other currencies are left out. |
store_idOptional | string | Only recommend from this store. |
limitOptional | integer | Number of results. Default 10, maximum 20. |
Returns
| Field | Type | Description |
|---|---|---|
recommendations | object[] | Best first. Each has product (ProductCard), a score from 0 to 100 and reasons, a list of short explanations. |
considered | integer | How many candidate products were scored. |
notes | string[] | Optional. Explains what was left out, such as products over budget. |
recommend_stores
Read-onlyRecommends 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
| Name | Type | Description |
|---|---|---|
needRequired | string | What the shopper wants to buy, or the kind of store they want. |
cityOptional | string | Prefer stores in this city. |
countryOptional | string | Only include stores in this country. |
limitOptional | integer | Number of results. Default 10, maximum 20. |
Returns
| Field | Type | Description |
|---|---|---|
recommendations | object[] | 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 cartAdds 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The product’s store. |
product_idRequired | string | The product to add. |
variant_idOptional | string | Required when the product has variants. Get it from get_product. |
quantityOptional | integer | How many to add, from 1 to 100. Default 1. |
Returns
A CartChange.
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
| Field | Type | Description |
|---|---|---|
stores | object[] | One entry per store in the cart. See below. |
item_count | integer | Total quantity across all stores. |
notes | string[] | Optional. General notes about the cart. |
Each store
| Field | Type | Description |
|---|---|---|
store_id | string | The store. |
store_name | string | The store’s name. |
currency | string | The store’s currency. |
lines | object[] | The items from this store. See below. |
subtotal | number | Total for the available items. |
display_subtotal | string | Formatted subtotal. |
savings | number | Discount compared with full prices. |
ready_for_checkout | boolean | false when something must be fixed first. |
issues | string[] | What must be fixed, if anything. |
Each line
| Field | Type | Description |
|---|---|---|
product_id | string | The product. |
variant_id | string | The variant, if any. |
title | string | The product title. |
variant_name | string | The variant’s name, if any. |
image_url | string | Product or variant image. |
quantity | integer | How many. |
unit_price | number | Current price for one. |
line_total | number | Unit price × quantity. |
display_unit_price | string | Formatted unit price. |
display_line_total | string | Formatted line total. |
discounted | boolean | Whether a discount applies. |
available | boolean | false when the item can’t be bought as it is. |
issue | string | Why the item isn’t available. |
update_cart_item
Session cartChanges the quantity of an item that’s already in the cart. A quantity of 0 removes it.
Inputs
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The item’s store. |
product_idRequired | string | The item’s product. |
variant_idOptional | string | Required if the item was added with a variant. |
quantityRequired | integer | The new quantity, up to 100. 0 removes the item. |
Returns
A CartChange.
remove_from_cart
Session cartRemoves one item from the cart.
Inputs
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The item’s store. |
product_idRequired | string | The item’s product. |
variant_idOptional | string | Required if the item was added with a variant. |
Returns
A CartChange.
clear_cart
Session cartEmpties 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
| Name | Type | Description |
|---|---|---|
store_idOptional | string | Only remove this store’s items. Leave it out to empty the whole cart. |
Returns
A CartChange.
Checkout#
Quote, confirm and pay for one store’s items as a guest, through Paystack.
Get the shopper’s approval
create_checkout until the shopper has seen the full quote and approved the exact amount. The guest checkout guide walks through the whole flow.prepare_checkout
Read-onlyGets 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
| Name | Type | Description |
|---|---|---|
store_idRequired | string | The store to check out. |
emailRequired | string | The shopper’s email. |
full_nameRequired | string | The recipient’s name. |
phoneRequired | string | The recipient’s phone. |
shipping_addressRequired | object | Needs address_line_1, city and country. Can also have address_line_2, state, postal_code, country_code, latitude and longitude. |
shipping_methodRequired | string | The exact option name from get_shipping_options. |
payment_methodOptional | string | mpesa (default) or card. Both are paid on Paystack. |
coupon_codeOptional | string | A store coupon. |
notesOptional | string | A note for the store. |
Returns
| Field | Type | Description |
|---|---|---|
checkout_id | string | Pass this to create_checkout. It becomes the order ID. |
pricing | object | items, currency, subtotal, shipping, tax, discount, service_fee, tip, total, charge_currency (always KES) and charge_amount_cents. |
display_charge | string | The exact amount to show the shopper. |
expires_at | string | When the quote expires, in RFC 3339 format. |
requires_confirmation | boolean | Always true. |
It also echoes the store, recipient, address, shipping method, payment method and payment_provider (paystack). See the checkout guide for a full example.
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
| Name | Type | Description |
|---|---|---|
checkout_idRequired | string | From prepare_checkout. |
confirmedRequired | boolean | true, only after the shopper approved this exact quote. |
confirmed_amount_centsRequired | integer | The approved charge_amount_cents from the quote. |
confirmed_currencyRequired | string | The approved charge currency, KES. |
Returns
A checkout result with the payment_url to give the shopper.
get_payment_status
Read-onlyChecks the payment status of a checkout created in this session. Only paid confirms payment. Wait at least 3 seconds between checks.
Inputs
| Name | Type | Description |
|---|---|---|
checkout_idRequired | string | From prepare_checkout. |
Returns
A checkout result. See the payment statuses.
Questions or feedback about these docs? Email info@shopeak.co.ke.