select_alternative
Swaps an item in the cart for a different product. Used after get_alternatives to let the customer pick a replacement.
Platform Support
| Platform | Status | Notes |
|---|---|---|
| iOS | Planned | iOS handles alternatives through remove + add flow |
| Android | Yes | Defined in the app-context module |
Authentication Required
The user must be signed in to use this tool.
Description
Replace a cart item with an alternative product
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
entry_guid | string | Yes | — | Cart entry GUID of the item to replace |
alternative_code | string | Yes | — | Product code of the alternative to use instead |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the swap was successful |
cart_total | string | Updated cart total |
Error Codes
| Code | Description |
|---|---|
AUTH_REQUIRED | User must be signed in |
INVALID_PARAMS | Missing entry_guid or alternative_code |
Source Files
- Android:
chat-pnp-android/mcp-app/src/main/java/pnp/app/mcp/app/tools/AppMCPTools.kt