Skip to main content

Enrich Image Context (Messaging)

messagingmcp-enrich_with_vm

Fetch VM (visual + page-text) context for a list of image_ids.

Use after a promo tool or messaging_search to pull the caption (and optionally OCR) plus channel/provenance metadata for specific shots. full_text=True returns untruncated OCR (default is a 500-char snippet).

Each entry's provenance: channel_name names the captured channel/page, channel_target describes how it was shot, date is the capture date. image_description is the VLM caption (may be empty when captioning failed); ocr_text is whole-page OCR text, not scoped to one promotion.

Parameters

NameTypeRequiredConstraintsDescription
image_idsstring[]yesimage_id values to look up — typically harvested from a prior promo tool (list_promos / count_promos / search_promo_text) or messaging_search.
includestring[] | nullnodefault: nullWhich content fields to return per image: subset of ['description', 'ocr']. None defaults to ['description'] — visual context is VM enrichment's unique value; OCR is opt-in.
full_textbooleannodefault: falseWhen True, forces OCR inclusion and returns it untruncated (overrides the default 500-char snippet). Default False.

Returns

  • On success: {"image_ids_found": [...], "image_ids_missing": [...],
  • "vm_context": {image_id: {...}}}. Missing ids are surfaced, never dropped.
  • 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-enrich_with_vm",
"arguments": {
"include": null,
"full_text": false
}
}
}'

Input schema

{
"type": "object",
"properties": {
"image_ids": {
"description": "image_id values to look up — typically harvested from a prior promo tool (list_promos / count_promos / search_promo_text) or messaging_search.",
"items": {
"type": "string"
},
"type": "array"
},
"include": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Which content fields to return per image: subset of ['description', 'ocr']. None defaults to ['description'] — visual context is VM enrichment's unique value; OCR is opt-in."
},
"full_text": {
"default": false,
"description": "When True, forces OCR inclusion and returns it untruncated (overrides the default 500-char snippet). Default False.",
"type": "boolean"
}
},
"required": [
"image_ids"
]
}