scrapewise_update_scraper_group_retention
Sets the group's count-based data retention: keep only the newest N data runs of EACH
scraper in the group; older runs' DATA is auto-deleted after a run finishes. The run
record is kept (visible under "show deleted jobs") because it is a billing premise — only
the scraped data is removed. A group value GOVERNS every scraper in the group (overrides
each scraper's own retention). retentionCount=null clears the group limit (each scraper
then uses its own). Available on every plan.
Args:
- id (string, path param, required): the group's MongoDB ObjectId.
- body (RetentionDTO, required): retentionCount — an integer >= 1, or null to clear.
Returns:
The updated GroupDTO (carrying retentionCount).
Examples:
- Use when: "keep only the last 5 data runs for every scraper in group {id}" → retentionCount=5
- Use when: "stop auto-deleting old runs in group {id}" → retentionCount=null
- Don't use when: you want to limit just one scraper → use scrapewise_update_scraper_retention
Error Handling:
- 400 if retentionCount < 1.
- 400 (CustomerError envelope) if no group with the given id exists for this customer.
- 401 Unauthorized.
- 500 INTERNAL.[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>",
"body": "<body>"
},
"name": "scrapewise_update_scraper_group_retention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the group's MongoDB ObjectId. | |
| body | Yes | retentionCount — an integer >= 1, or null to clear. |