Skip to main content

Match Images to Text (Research)

researchmcp-research_match_images_to_text

Find images that match arbitrary text by meaning.

Use when you have an answer (or any text) and want to surface images that visually support it. Differs from research_image_search in two ways:

  • The input is text (typically longer than a query — e.g. an already-generated answer).
  • No date filters. Use report_ids to constrain scope.

Match-only: the response is the raw search hits. The caller is responsible for any perceptual-hash dedup or LLM relevance filtering if desired.

Ranking blends relevance with recency, plus the optional intent axes when supplied (no date window is applied here — only report_ids constrains scope). The score on each hit is this composite value.

Try queries like

"Oversized tailoring dominated the autumn runways.", "Retailers are leaning into minimalist, recyclable packaging this season.".

Parameters

NameTypeRequiredConstraintsDescription
textstringyesFree-form text — an answer, paragraph, or anything — to find images that match its meaning. Typically longer than a search query.
report_idsinteger[] | nullnodefault: nullConstrain the search to images from specific reports. Pass the report_id values from a previous search. Omit to search the full corpus.
kintegernodefault: 5 · 1–10Number of images to return. Default 5, max 10.
article_typesstring[] | nullnodefault: nullEditorial-format slugs the query is about, to bias ranking toward matching reports (e.g. 'forecasting', 'trend-analysis', 'street-style'). Optional; unknown values are ignored. Populate from research_analyze_query.intent.article_types or your own reasoning.
topicsstring[] | nullnodefault: nullSubject-matter slugs to bias ranking toward (e.g. 'denim-fabric', 'footwear', 'color', 'sustainability'). Optional; unknown values are ignored.
genderstring[] | nullnodefault: nullAudience slugs to bias ranking toward: 'men', 'women', 'children', 'mid-mature'. Optional; unknown values are ignored.
seasonstring[] | nullnodefault: nullRetail-season slugs to bias ranking toward: 'spring-summer', 'fall-winter', 'pre-spring', 'pre-fall'. A ranking signal only — never converted to a date filter. Optional; unknown values are ignored.
yearstring[] | nullnodefault: nullFour-digit year(s) the query targets (e.g. ['2025']). Biases ranking and, when no explicit start/end date is given, narrows the time window to those years. Optional; values outside 2000-2099 are ignored.
momentsstring[] | nullnodefault: nullNamed retail-moment slugs the query targets (e.g. 'black-friday', 'valentines-day', 'holiday-season'). Biases ranking and, when no explicit start/end date is given, contributes a recent time window. Optional; unknown values are ignored.

Returns

  • On success: {"total": int, "images": list[ImageHit]} where each hit
  • carries report_id, title, date, score, url, caption,
  • copyright (image attribution string or null), format, and
  • image_id. total is the number of images returned (<= k).
  • On retrieval failure or invalid k: {"error": str}.
  • image_id is an opaque id assigned when the image is indexed — fetch it back
  • with research_get_image within the same session. It is not durable across
  • re-ingestion (the hourly cron reassigns ids when a report is modified), so
  • don't persist it beyond the session.

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": "researchmcp-research_match_images_to_text",
"arguments": {
"text": "example",
"report_ids": null,
"k": 5,
"article_types": null,
"topics": null,
"gender": null,
"season": null,
"year": null,
"moments": null
}
}
}'

Input schema

{
"type": "object",
"properties": {
"text": {
"description": "Free-form text — an answer, paragraph, or anything — to find images that match its meaning. Typically longer than a search query.",
"type": "string"
},
"report_ids": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Constrain the search to images from specific reports. Pass the `report_id` values from a previous search. Omit to search the full corpus."
},
"k": {
"default": 5,
"description": "Number of images to return. Default 5, max 10.",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"article_types": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Editorial-format slugs the query is about, to bias ranking toward matching reports (e.g. 'forecasting', 'trend-analysis', 'street-style'). Optional; unknown values are ignored. Populate from research_analyze_query.intent.article_types or your own reasoning.",
"items": {
"enum": [
"trend-analysis",
"trends-by-season",
"trends-by-city",
"street-style",
"retailer-messaging",
"buyers-guide",
"consumer-moments",
"hindsighting",
"consumer-strategy",
"forecasting",
"product-newness",
"collections-by-city",
"events-opportunities",
"messaging-calendars",
"assortment-pricing",
"site-merchandising-promotion"
],
"type": "string"
}
},
"topics": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Subject-matter slugs to bias ranking toward (e.g. 'denim-fabric', 'footwear', 'color', 'sustainability'). Optional; unknown values are ignored.",
"items": {
"enum": [
"footwear",
"accessories",
"pricing-discounting",
"denim-fabric",
"color",
"bottoms",
"active-sports",
"subcultures",
"print-licensing",
"intimates-swimwear",
"tops",
"outerwear",
"details-trims",
"diversity-inclusion",
"dresses",
"sustainability",
"generation-demographic",
"knitwear",
"tailoring"
],
"type": "string"
}
},
"gender": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Audience slugs to bias ranking toward: 'men', 'women', 'children', 'mid-mature'. Optional; unknown values are ignored.",
"items": {
"enum": [
"men",
"women",
"children",
"mid-mature"
],
"type": "string"
}
},
"season": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Retail-season slugs to bias ranking toward: 'spring-summer', 'fall-winter', 'pre-spring', 'pre-fall'. A ranking signal only — never converted to a date filter. Optional; unknown values are ignored.",
"items": {
"enum": [
"spring-summer",
"fall-winter",
"pre-spring",
"pre-fall"
],
"type": "string"
}
},
"year": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Four-digit year(s) the query targets (e.g. ['2025']). Biases ranking and, when no explicit start/end date is given, narrows the time window to those years. Optional; values outside 2000-2099 are ignored.",
"items": {
"pattern": "^20[0-9]{2}$",
"type": "string"
}
},
"moments": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Named retail-moment slugs the query targets (e.g. 'black-friday', 'valentines-day', 'holiday-season'). Biases ranking and, when no explicit start/end date is given, contributes a recent time window. Optional; unknown values are ignored.",
"items": {
"enum": [
"black-friday",
"lunar-new-year",
"easter",
"halloween",
"international-womens-day",
"mothers-day-uk",
"mothers-day-us",
"4th-july-us",
"earth-month",
"festival-season",
"holiday-season",
"ramadan",
"valentines-day",
"back-to-college",
"back-to-school",
"fathers-day",
"occasion-season",
"spring-break-us"
],
"type": "string"
}
}
},
"required": [
"text"
]
}