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
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
retailers | string[] | null | no | default: null | 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 | string[] | null | no | default: null | 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 | string | null | no | default: null | 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 | string | null | no | default: null | End of the date window (inclusive, YYYY-MM-DD). |
promo_types | string[] | null | no | default: null | Promo types to include: 'percentage_discount', 'flat_discount', 'multi-buy'. None = all. |
min_depth | integer | null | no | default: null | 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 | integer | null | no | default: null | Maximum promo_depth pre-filter. Same unit caveat as min_depth. |
has_code | boolean | null | no | default: null | True = only promos with a code, False = only without, null = no filter. |
include_inferred | boolean | no | default: true | Include inferred promotions (default True). False = observed only. |
limit | integer | no | default: 10 · 1–50 | Max distinct promotions. Default 10. |
Returns
- On success: {"total_matched", "coverage", "returned", "promos": [...],
- "filter_echo"}.
- On failure: {"error": str}.
Try it
Code examples
- curl
- TypeScript
- Python
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
}
}
}'
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "demo", version: "1.0.0" }, { capabilities: {} });
await client.connect(
new StreamableHTTPClientTransport(new URL("https://mcp.edited.com/mcp"), {
requestInit: { headers: { "x-api-key": process.env.MCP_API_KEY ?? "" } },
}),
);
const result = await client.callTool({
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
},
});
import os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
headers = {"x-api-key": os.environ["MCP_API_KEY"]}
async with streamablehttp_client("https://mcp.edited.com/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool(
"messagingmcp-list_promos",
{"retailers": None, "regions": None, "start_date": None, "end_date": None, "promo_types": None, "min_depth": None, "max_depth": None, "has_code": None, "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"
}
}
}