scrapewise_get_scraper_group_post_process_rules
Returns the group's shared post-processing rules ("Rules for all scrapers"), the per-scraper
values their conditions may read, the document version, and a paged per-scraper report of how
the rules apply (which outputs a scraper's own rule overrides, which choice groups it owns,
which inputs it does not declare).
How group rules run: after each scraper's own rules, in list order, on every scraper of the
group (also on uploaded-file scrapers). A scraper rule writing the same outputField wins on all
that scraper's rows; if any rule of a choice group (branchSet) is overridden, the whole choice
group is skipped for that scraper. A rule may have up to 3 conditions (AND): op equals / in /
contains / notBlank / blank on a row field (a row value that is not blank wins, else the
scraper's value from scraperValues). Rules in a choice group run only when exactly ONE choice's
conditions hold; none -> row warning RULE_NO_BRANCH:<set>, several -> RULE_MULTI_BRANCH:<set>
(never a default). Other row warnings (in _sw_warnings): RULE_NO_INPUT:<output> (a quantityField
or fromField is missing), RULE_UNUSABLE:<output> (divisor <= 0 or not a number, unknown
currency, output already a scraped column). CURRENCY_CONVERT may read the source currency per
row with params.fromField instead of a fixed params.from. It writes its outputField plus ONE
shared pair per target currency per row: <to>_rate and <to>_rate_date (e.g. eur_rate,
eur_rate_date), shared by every rule (scraper or group) converting to that currency; one rate
table per run. RULE_RATE_CONFLICT:<to>_rate when two rules on one row need two different rates
(both values kept, no pair). A row that already has its own eur_rate / eur_rate_date keeps it;
a group CURRENCY_CONVERT to EUR then gets RULE_UNUSABLE:<output>.
Members of ONE choice group may share an outputField (same kind and outputType, and for
CURRENCY_CONVERT the same to): only the picked choice writes it; no or several choices -> none
of the group's outputs is written. ENUM_MAP with an empty mapping and a default writes that
default as a fixed value (on rows whose sourceField is not blank).
Args:
- id (string, path param, required): the group's MongoDB ObjectId.
- page (int, query, optional, default 0): page of the per-scraper report.
- size (int, query, optional, default 200, max 200): rows per page.
- filter (string, query, optional, default ALL): ALL | OWN (scrapers with their own rule for a
group output) | PROBLEMS (scrapers with row warnings); q (string, optional, at most 100
characters): scraper name contains, case-insensitive; split (bool, optional): with ALL, the
scrapers with row warnings come in problemScrapers and the page holds the others; summary
(bool, optional): adds summary {problemLines, ownRuleScrapers}.
Returns:
GroupPostProcessRulesDTO — rules, scraperValues, version (0 = no rules yet), updated,
updatedBy (the account owner's email when they made the last change, else null), counts {scrapers, overridden, missingDeclaredInput, missingValue}, scrapers
(the page of per-scraper rows), page, size, totalScrapers.
Each row also has missingLabels and rowWarnings [{code, choiceGroup, rows}]: rows stored with
RULE_NO_BRANCH / RULE_MULTI_BRANCH in that scraper's latest run (counts.withRowWarnings,
matchingScrapers = the rows behind the page after q/filter/split).
Examples:
- Use when: "which rules apply to every scraper in group {id}?"
- Use when: before scrapewise_update_scraper_group_post_process_rules, to read the version
- Don't use when: you want one scraper's own rules -> scrapewise_get_scraper
Error Handling:
- 400 (CustomerError envelope) if no group with this id exists for this customer (also for a
group only shared with you), or size > 200.
- 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>"
},
"name": "scrapewise_get_scraper_group_post_process_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | ||
| id | Yes | ||
| page | No | ||
| size | No | ||
| split | No | ||
| filter | No | ||
| summary | No |