scrapewise_update_scraper_retention
Sets this scraper's count-based data retention: keep only the newest N data runs; 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.
If the scraper's GROUP sets a retention value, the group's value wins. retentionCount=null
clears the per-scraper limit. Available on every plan.
Args:
- id (string, path param, required): the scraper's MongoDB ObjectId.
- body (RetentionDTO, required): retentionCount — an integer >= 1, or null to clear.
Returns:
The updated ScraperDTO (config.retentionCount reflects the new value).
Examples:
- Use when: "keep only the last 10 data runs for scraper {id}" → retentionCount=10
- Use when: "remove the per-scraper run limit on scraper {id}" → retentionCount=null
- Don't use when: the scraper's group already sets retention → the group value wins; change it on the group
Error Handling:
- 400 if retentionCount < 1.
- 400 (CustomerError envelope) if no scraper 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_retention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the scraper's MongoDB ObjectId. | |
| body | Yes | retentionCount — an integer >= 1, or null to clear. |