List Coupons
Lists WooCommerce coupons with their discount type and usage stats. Supports an exact code lookup or a partial search.
Also known as: discount codes, promo codes, vouchers.
| Property | Value |
|---|---|
| Ability slug | mosmcp/list-coupons |
| Wire tool name | mosmcp__list-coupons |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_shop_coupons |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| search | string | — | Partial search term matched against coupon code. | |
| code | string | — | Exact coupon code lookup. Takes precedence over search. | |
| page | integer | 1 |
Page number, for pagination. | |
| per_page | integer | 20 |
Results per page (1-100). |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| message | string | |
| data | object | |
| data.coupons | object[] | |
| meta | object | |
| meta.ability | string | |
| meta.timestamp | string | |
| meta.execution_time | string \| null | |
| meta.pagination | object |
Example
Sample prompt
Show me all my active discount codes and how often they've been used.
Example request (json)
{
"jsonrpc": "2.0",
"id": 372,
"method": "tools/call",
"params": {
"name": "mosmcp__list-coupons",
"arguments": {
"input": {}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 372,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "1 coupon(s) retrieved.",
"data": {
"coupons": [
{
"id": 210,
"code": "autumn15",
"amount": "15",
"date_created": "2026-09-01T08:00:00",
"date_modified": "2026-09-01T08:00:00",
"discount_type": "percent",
"description": "Autumn sale - 15% off",
"date_expires": "2026-10-31T00:00:00",
"usage_count": 23,
"individual_use": true,
"product_ids": [],
"excluded_product_ids": [],
"usage_limit": 200,
"usage_limit_per_user": 1,
"limit_usage_to_x_items": null,
"free_shipping": false,
"product_categories": [],
"excluded_product_categories": [],
"exclude_sale_items": true,
"minimum_amount": "30.00",
"maximum_amount": "",
"email_restrictions": [],
"used_by": [
"57",
"jane@example.com"
]
}
]
},
"meta": {
"ability": "mosmcp/list-coupons",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms",
"pagination": {
"total": 1,
"total_pages": 1,
"current_page": 1,
"has_next": false,
"has_previous": false
}
}
}
}
}
Edge cases / errors
- Only published coupons are listed; drafts and trashed coupons are skipped.
- code does an exact lookup and ignores search and pagination; no match returns an empty list.
- search is a partial match on the coupon code/description; per_page is clamped to 1-100.
| << Previous | Next >> |
|---|---|
| Get Product Attribute | List Customer Segment |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.