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[]no—Retailer slugs to filter by, e.g. ['zara', 'h-m']. Omit for all; matches any listed retailer. Slugs match exactly and are case-sensitive, so take them from list_retailers: match the request against retailer_name, then pass that row's retailer slug and one of the regions it reports.
regionsstring[]no—Regions to filter by, e.g. ['UK', 'US']. Omit for all; matches any listed region. Exact match, so use the values list_retailers reports for the retailer.
start_datestringno—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_datestringno—End of the date window (inclusive, YYYY-MM-DD).
promo_typesstring[]no—Promo types to include: 'percentage_discount', 'flat_discount', 'multi-buy'. Omit for all.
min_depthintegerno—Minimum promo_depth. Depths are unitless — a percentage or a currency amount depending on the promo type — so constrain the type to avoid mixing units.
max_depthintegerno—Maximum promo_depth. Same unit caveat as min_depth.
has_codebooleanno—True = only promos with a code, False = only without; omit for no filter.
include_inferredbooleannodefault: trueInclude inferred promotions (default True). False = observed only.
limitintegernodefault: 10 · 1–50Max distinct promotions.

Returns​

  • On success: {"result": {"total_matched", "coverage", "returned",
  • "promos": [...], "filter_echo"}}.
  • On failure: {"error": {code, message}}
  • code is invalid_input, upstream_unavailable, or
  • not_entitled (authorization refused).

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": {
"start_date": "example",
"end_date": "example",
"min_depth": 1,
"max_depth": 1,
"has_code": false,
"include_inferred": true,
"limit": 10
}
}
}'

Input schema​

{
"type": "object",
"properties": {
"retailers": {
"description": "Retailer slugs to filter by, e.g. ['zara', 'h-m']. Omit for all; matches any listed retailer. Slugs match exactly and are case-sensitive, so take them from `list_retailers`: match the request against `retailer_name`, then pass that row's `retailer` slug and one of the regions it reports.",
"items": {
"type": "string"
},
"type": "array"
},
"regions": {
"description": "Regions to filter by, e.g. ['UK', 'US']. Omit for all; matches any listed region. Exact match, so use the values `list_retailers` reports for the retailer.",
"items": {
"type": "string"
},
"type": "array"
},
"start_date": {
"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.",
"format": "date",
"type": "string"
},
"end_date": {
"description": "End of the date window (inclusive, YYYY-MM-DD).",
"format": "date",
"type": "string"
},
"promo_types": {
"description": "Promo types to include: 'percentage_discount', 'flat_discount', 'multi-buy'. Omit for all.",
"items": {
"type": "string"
},
"type": "array"
},
"min_depth": {
"description": "Minimum promo_depth. Depths are unitless — a percentage or a currency amount depending on the promo type — so constrain the type to avoid mixing units.",
"type": "integer"
},
"max_depth": {
"description": "Maximum promo_depth. Same unit caveat as min_depth.",
"type": "integer"
},
"has_code": {
"description": "True = only promos with a code, False = only without; omit for no filter.",
"type": "boolean"
},
"include_inferred": {
"default": true,
"description": "Include inferred promotions (default True). False = observed only.",
"type": "boolean"
},
"limit": {
"default": 10,
"description": "Max distinct promotions.",
"maximum": 50,
"minimum": 1,
"type": "integer"
}
}
}

Output schema​

Describes both branches of the envelope — result on success, error on a refusal. Validate against this rather than pattern-matching the prose above; see Concepts → Response shape.

{
"type": "object",
"properties": {
"result": {
"properties": {
"total_matched": {
"description": "Distinct promotions, counted exactly to 40,000 and estimated above that (within roughly half a percent). The full count; the page in promos may be smaller.",
"type": "integer"
},
"coverage": {
"description": "The dataset frontier, ignoring the query's own filters.\n\nend is the latest observed (non-inferred) promotion date, so a promo still\nrunning at the frontier can be told from one that genuinely closed. Either\nbound is null on an empty index.",
"properties": {
"start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"start",
"end"
],
"type": "object"
},
"returned": {
"type": "integer"
},
"promos": {
"items": {
"properties": {
"promo_id": {
"type": "string"
},
"image_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"retailer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The retailer slug — this is the value the retailers filter accepts."
},
"retailer_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name, not filterable."
},
"region": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"channel_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_depth": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null
},
"promo_currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_codes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_categories": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null
},
"promo_conditions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null
},
"all_observed_codes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Union across every banner folded into this record; the singular field of the same name is unaffected by it."
},
"all_observed_categories": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Union across every banner folded into this record; the singular field of the same name is unaffected by it."
},
"all_observed_conditions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Union across every banner folded into this record; the singular field of the same name is unaffected by it."
},
"promo_gender": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"promo_start_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"active_window": {
"anyOf": [
{
"description": "A promo's outer first-to-last span, computed per query.\n\nduration_days is the inclusive calendar span start..end, not a count of\nactive days — the window may contain gaps.",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"duration_days": {
"type": "integer"
}
},
"required": [
"start",
"end",
"duration_days"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Null when either span bound is missing."
},
"any_inferred": {
"description": "Whether ANY backing row is forward-projected — campaign-level provenance.",
"type": "boolean"
}
},
"required": [
"promo_id",
"active_window",
"any_inferred"
],
"type": "object"
},
"type": "array"
},
"filter_echo": {
"properties": {
"retailers": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null
},
"regions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null
},
"start_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"end_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"include_inferred": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"min_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"max_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"has_code": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"promo_types": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
}
},
"type": "object"
}
},
"required": [
"total_matched",
"coverage",
"returned",
"promos",
"filter_echo"
],
"type": "object"
},
"error": {
"type": "object",
"description": "Present instead of `result` when the call was rejected. Branch on `code`; never string-match `message`.",
"properties": {
"code": {
"type": "string",
"enum": [
"invalid_input",
"not_entitled",
"upstream_unavailable",
"internal"
]
},
"message": {
"type": "string"
},
"field": {
"type": "string",
"description": "Offending parameter, when the failure is attributable to one."
},
"details": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"code",
"message"
]
}
},
"oneOf": [
{
"required": [
"result"
]
},
{
"required": [
"error"
]
}
],
"x-fastmcp-wrap-result": true
}