scrapewise_run_scraper_data_group
Combines the scraped rows from N scraperJobStatus runs (each from a different
scraper) into one enriched dataset, matched on the `title` field (which must
be a stable identifier like EAN/barcode — NOT a constant). The result lands in
the group's enriched-sibling collection (same `reference` UUID, group name +
"_enriched"). Requires the DATA_ENRICHMENT plan feature. Only the LATEST
completed run per scraper is accepted. It REPLACES the group's existing
enriched dataset: call scrapewise_get_enrichment first and confirm with the user
before you overwrite one. The group must be your own.
Args:
- id (string, path param, required): the group's MongoDB ObjectId.
- scraperJobStatusIds (Set<string>, query param, required): the run ids to
merge. Pass each via repeated query param: ?scraperJobStatusIds=a&scraperJobStatusIds=b.
Returns:
`Map<String, Any>` — currently `{"mergedItems": <int>}` indicating how many
enriched rows were produced.
Examples:
- Use when: "merge runs {a, b, c} of group {id} into one dataset by EAN"
- Use when: "combine results from these scraper runs into the enriched
sibling collection" → same op
- Use when: "consolidate the latest runs of competitor scrapers A and B"
- Don't use when: scrapers don't share a stable id field → won't match anything
and the call returns 422 (no rows merged)
Error Handling:
- 402 if customer plan lacks DATA_ENRICHMENT feature.
- 422 if zero rows could be merged (none of the supplied runs are the LATEST
COMPLETED for their scraper, or the rows have no matching `title` field).
- 400 (CustomerError envelope) if no group with the given id exists for this
customer, scraperJobStatusIds is empty, or an id is not a valid ObjectId.
- 500 INTERNAL on an unexpected error.
- 401 Unauthorized.[runtime hint] This tool returns JSON-as-text — its response shape is dynamic (per-scraper itemsConfig, file binary, etc.) so the MCP outputSchema is omitted. Do not rely on the presence of any specific field in the response; treat the result as a string-or-object blob and parse defensively.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "scrapewise_run_scraper_data_group"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the group's MongoDB ObjectId. | |
| body | No | Optional column-mapping spec: with it, the runs are joined by these column mappings. Without a body, the runs in scraperJobStatusIds are joined by product title (the older way). | |
| scraperJobStatusIds | No | the run ids to merge. Pass each via repeated query param: ?scraperJobStatusIds=a&scraperJobStatusIds=b. |