Skip to main content

show_products

Shows the customer visual product cards — with images, prices, and add-to-cart buttons — inside the chat, instead of describing products in text. It should be called after every product search or detail lookup so the customer can see and interact with the results. When several groups of products are shown at once, each group becomes its own labelled carousel (e.g. "Pizza bases", "Mozzarella"). If the products came from a search, passing the original search text adds a "see all results" link that takes the customer to the full search-results page.

Platform Support

PlatformStatusNotes
iOSYesRenders native SwiftUI product cards with images and add-to-cart buttons in a carousel. Supports the title and search_query parameters.
AndroidYesRenders an in-line product carousel in the chat UI. Each call creates a separate carousel; the title is shown as the carousel heading. When search_query is supplied (and the carousel overflows) a "see all results" chevron navigates to the full product-listing page (PLP).

Description

Display product cards in a carousel with images, prices, and add-to-cart buttons

Parameters

NameTypeRequiredDefaultDescription
product_codesstringYesComma-separated product codes to display from previous search/detail results
titlestringNoTitle/label for this group of products, used as the carousel heading (e.g. "Pizza bases", "Mozzarella")
search_querystringNoThe original query passed to search_products. Powers a "see all results" chevron that links to the full search-results page (PLP).

Response

FieldTypeDescription
displayedbooleanWhether the product cards were rendered
countintegerNumber of products displayed

Error Codes

CodeDescription
INVALID_PARAMSMissing or empty product_codes

Source Files

  • iOS: one-app-ios-chat/Chat/Sources/Chat/MCP/EcommerceMCPServer.swift
  • Android: chat-pnp-android/mcp-ecommerce/src/main/java/pnp/app/mcp/ecommerce/tools/EcommerceMCPTools.kt