Skip to main content

search_products

Lets the customer search for products by name, keyword, or category. Returns matching products with prices, images, and stock availability.

Platform Support

PlatformStatusNotes
iOSYes
AndroidYesAndroid advertises a default limit of 10 (max 50), though the client prompt instructs the model to pass limit 20. Sort options are relevance, price-asc, price-desc, name-asc (no name-desc).

Description

Search for products in the Pick n Pay catalog

Parameters

NameTypeRequiredDefaultDescription
querystringYesSearch query text
limitintegerNo20Maximum number of results to return
sortstringNoSort order for results (values: relevance, price-asc, price-desc, name-asc, name-desc)
categorystringNoCategory filter to narrow results

Response

FieldTypeDescription
total_resultsintegerTotal number of matching products
productsarrayList of matching products
codestringUnique product code
namestringProduct display name
pricestringFormatted price (e.g. "R29.99")
image_urlstringProduct image URL
in_stockbooleanWhether the product is currently available
unitstringUnit of measure (e.g. "per kg", "each")

Error Codes

CodeDescription
SEARCH_FAILEDProduct search service returned an error
INVALID_PARAMSMissing or invalid search parameters

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