Skip to main content
Glama

scrapewise_get_scraper_group_post_process_rules

Read-onlyIdempotent
        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

NameRequiredDescriptionDefault
qNo
idYes
pageNo
sizeNo
splitNo
filterNo
summaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/idempotent/non-destructive/closed-world, and the description still adds substantive context beyond them: rule execution order, override precedence, choice-group skipping, the exact warning codes that can appear in rowWarnings, currency rate-pair sharing and RULE_RATE_CONFLICT behavior, and per-status error envelopes (400 missing group, 400 size > 200, 401, 500). This is behavior an agent needs in order to interpret the response, not a restatement of the annotation block.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and cleanly sectioned (purpose, rule semantics, Args, Returns, Examples, Error Handling), so an agent can skim to the parts it needs. It is long, and the dense rule-engine exposition between the purpose and the Args block risks burying the invocation details, but each paragraph is reference material the agent needs to decode warning codes rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description must specify the return shape, and it does in detail: the GroupPostProcessRulesDTO fields, version 0 meaning no rules, updatedBy null semantics, counts, pagination fields, and per-row missingLabels/rowWarnings. Combined with the documented error codes, an agent has enough to call this and interpret results without guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the entire burden, and it does: every one of the seven parameters is documented with location, required/optional status, defaults, and semantics — filter's ALL/OWN/PROBLEMS modes, q as a case-insensitive substring capped at 100 characters, split's interaction with ALL (problemScrapers vs. the page), and summary adding problemLines/ownRuleScrapers. It also states size's max of 200, which the schema alone does not express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: returns the group's shared post-processing rules, the per-scraper values their conditions may read, the document version, and a paged per-scraper applicability report. It also explicitly distinguishes itself from the sibling scrapewise_get_scraper in the 'Don't use when' line, so an agent can route between the group-level and scraper-level read without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides two concrete 'Use when' triggers (which rules apply to every scraper in the group; read version before calling scrapewise_update_scraper_group_post_process_rules) and one explicit exclusion routing to scrapewise_get_scraper. That is the full when/when-not/alternative triad.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.