Skip to main content

Get Promotion Details (Messaging)

messagingmcp-get_promo

Fetch a single promotion by promo_id — the campaign detail / drill-down view.

The representative capture is the most recent one (or the most recent at or before as_of). Provenance comes at two levels: any_inferred (campaign — does any backing row come from forward-projection?) and representative_inferred (row — does this specific view rest on a projected capture?); n_observed counts the distinct observed captures (same-day re-shoots count separately). All are scoped to <= as_of when given.

Unlike list/search, the response includes promo_active_dates — the literal active sub-ranges (half-open {gte, lt}), gaps visible — so use this tool to answer "has this promotion run continuously?".

Parameters

NameTypeRequiredConstraintsDescription
promo_idstringyesThe promo_id to fetch (as returned by list_promos / search_promo_text).
as_ofstring | nullnodefault: nullOptional point-in-time view (YYYY-MM-DD). Returns the promotion as it stood on or before this date — the latest capture whose date is <= as_of.

Returns

  • On success: {"promo": PromoHit}.
  • When the promo_id is unknown (or has no capture at/before as_of): {"promo": null}.
  • 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-get_promo",
"arguments": {
"promo_id": "example",
"as_of": null
}
}
}'

Input schema

{
"type": "object",
"properties": {
"promo_id": {
"description": "The promo_id to fetch (as returned by list_promos / search_promo_text).",
"type": "string"
},
"as_of": {
"anyOf": [
{
"format": "date",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional point-in-time view (YYYY-MM-DD). Returns the promotion as it stood on or before this date — the latest capture whose date is <= as_of."
}
},
"required": [
"promo_id"
]
}