apply_voucher
Applies a promotional voucher or coupon code to the customer's cart for a discount.
Platform Support
| Platform | Status | Notes |
|---|---|---|
| iOS | Yes | — |
| Android | Yes | — |
Authentication Required
The user must be signed in to use this tool.
Description
Apply a voucher/coupon code to the cart
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
voucher_code | string | Yes | — | The voucher or coupon code to apply |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the voucher was applied |
discount | string | Discount amount applied |
cart_total | string | Updated cart total after discount |
Error Codes
| Code | Description |
|---|---|
AUTH_REQUIRED | User must be signed in |
INVALID_PARAMS | Missing voucher_code |
EXECUTION_ERROR | Invalid or expired voucher code |
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