Build the storefront
build_shopWrite a complete storefront for the linked Komers store into the draft: product grid with search and categories, options, a cart kept in the browser, checkout through Komers (FPX/e-wallet payment and delivery handled by Komers; follows the store opening hours: while closed it offers ordering ahead for self pickup with a pickup day and time, errors show as toasts), and a product page template served at /p//. Files: shop.html (or index.html), product.html, css/shop.css, js/shop.js. Uses css/site.css if the site has one. Then link to /shop from the home page, preview_site, check_site and publish_site. Re-running replaces those four files. Layout: so shops don't all look the same, first run shop_layout_options and ask the owner how it should look on phones and desktop (product list, product details as page/popup/bottom sheet/side panel, cart as drawer/sheet/full screen, categories, phone menu bar), then pass preset and/or desktop/mobile here; that adds css/shop-layout.css and js/shop-layout.js. Later runs keep the chosen layout.
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": {
"site": "<site>"
},
"name": "build_shop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | "shop" = a /shop page (keep the home page), "index" = the home page is the shop | shop |
| site | Yes | Site slug (e.g. "kopitiam-muar") or id | |
| intro | No | ||
| mobile | No | Layout choices for phones, e.g. { "detail": "sheet", "nav": "bottom" } | |
| preset | No | Layout style the owner chose (shop_layout_options): classic, app, lookbook or catalogue. Leave out to keep the last one. | |
| desktop | No | Layout choices for wide screens, e.g. { "detail": "modal", "categories": "sidebar" } | |
| heading | No | Shop | |
| layout_decided_by | No | "owner" when the owner picked the layout (the normal case); "ai" only when the owner explicitly asked you to decide | owner |