Skip to main content

List Promotions (Messaging)

messagingmcp-list_promos

List distinct promotions (one per promo_id = one campaign), newest first by start date.

Entries are campaign-level. Same-offer banners within one screenshot are folded into a single record (their extras appear flat in all_observed_* — there is no nested related-promos structure); active_window ({start, end, duration_days}) is that record's lifetime across captures — the outer calendar span, which may contain gaps (duration_days counts the span, not active days; for the literal gap-visible sub-ranges call get_promo). A long window is the expected signature of an ongoing campaign. any_inferred marks campaigns with at least one forward-projected backing row.

Field meanings (promo_depth units per type, "sitewide" categories, single promo_codes, English-only text, exclusions like free shipping): call explain_promo_data.

total_matched is the full distinct-promo count (the returned page may be smaller); coverage is the dataset's observed date frontier — an active_window.end at or beyond coverage.end means "ongoing at the frontier" (projected rows can run up to 5 days past it, so window ends may exceed coverage.end and even today).

Parameters

NameTypeRequiredConstraintsDescription
retailersstring[] | nullnodefault: nullRetailer slugs to filter by, e.g. ['zara', 'h-m']. None = all; matches any listed retailer. Call list_retailers and match the requested retailer against its retailer_name, then pass the row's retailer slug and a region it covers exactly as reported there. Slugs match exactly, so a display name or wrong case matches nothing.
regionsstring[] | nullnodefault: nullRegions to filter by, e.g. ['UK', 'US']. None = all; matches any listed region. list_retailers reports the exact region values for each retailer; use those, since regions match exactly.
start_datestring | nullnodefault: nullStart of the date window (inclusive, YYYY-MM-DD). Matches promotions active at ANY point in [start_date, end_date], not ones that started there.
end_datestring | nullnodefault: nullEnd of the date window (inclusive, YYYY-MM-DD).
promo_typesstring[] | nullnodefault: nullPromo types to include: 'percentage_discount', 'flat_discount', 'multi-buy'. None = all.
min_depthinteger | nullnodefault: nullMinimum promo_depth pre-filter. Depths are unitless (% or currency amount depending on promo_type) — pair with promo_types to avoid mixing units.
max_depthinteger | nullnodefault: nullMaximum promo_depth pre-filter. Same unit caveat as min_depth.
has_codeboolean | nullnodefault: nullTrue = only promos with a code, False = only without, null = no filter.
include_inferredbooleannodefault: trueInclude inferred promotions (default True). False = observed only.
limitintegernodefault: 10 · 1–50Max distinct promotions. Default 10.

Returns

  • On success: {"total_matched", "coverage", "returned", "promos": [...],
  • "filter_echo"}.
  • On failure: {"error": str}.

Try it

Loading interactive widget…

Code examples

curl -s https://mcp.edited.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-06-18" \
-H "x-api-key: $MCP_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "messagingmcp-list_promos",
"arguments": {
"retailers": null,
"regions": null,
"start_date": null,
"end_date": null,
"promo_types": null,
"min_depth": null,
"max_depth": null,
"has_code": null,
"include_inferred": true,
"limit": 10
}
}
}'

Input schema

{
"type": "object",
"properties": {
"retailers": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Retailer slugs to filter by, e.g. ['zara', 'h-m']. None = all; matches any listed retailer. Call `list_retailers` and match the requested retailer against its `retailer_name`, then pass the row's `retailer` slug and a region it covers exactly as reported there. Slugs match exactly, so a display name or wrong case matches nothing."
},
"regions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Regions to filter by, e.g. ['UK', 'US']. None = all; matches any listed region. `list_retailers` reports the exact region values for each retailer; use those, since regions match exactly."
},
"start_date": {
"anyOf": [
{
"format": "date",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Start of the date window (inclusive, YYYY-MM-DD). Matches promotions active at ANY point in [start_date, end_date], not ones that started there."
},
"end_date": {
"anyOf": [
{
"format": "date",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "End of the date window (inclusive, YYYY-MM-DD)."
},
"promo_types": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Promo types to include: 'percentage_discount', 'flat_discount', 'multi-buy'. None = all."
},
"min_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum promo_depth pre-filter. Depths are unitless (% or currency amount depending on promo_type) — pair with promo_types to avoid mixing units."
},
"max_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum promo_depth pre-filter. Same unit caveat as min_depth."
},
"has_code": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "True = only promos with a code, False = only without, null = no filter."
},
"include_inferred": {
"default": true,
"description": "Include inferred promotions (default True). False = observed only.",
"type": "boolean"
},
"limit": {
"default": 10,
"description": "Max distinct promotions. Default 10.",
"maximum": 50,
"minimum": 1,
"type": "integer"
}
}
}