Skip to main content
Glama

scrapewise_update_scraper_group_post_process_rules

Idempotent
        Replaces the group's shared post-processing rules and per-scraper values in one save
        (compare-and-set on version). See scrapewise_get_scraper_group_post_process_rules for how group
        rules run. Send an empty rules list to clear them.

        Args:
          - id (string, path param, required): the group's MongoDB ObjectId.
          - body (GroupPostProcessRulesUpdateDTO, required):
            - rules: GroupPostProcessRule[] (max 50) — kind, sourceField, outputField, outputType,
              params, plus optional conditions [{field, op, value | values}] (max 3; op equals | in |
              contains | notBlank | blank), branchSet + branch (a named choice; same conditions on
              every rule of one choice, 2-10 choices per set, max 10 sets). overwritesRawField must be
              false. CURRENCY_CONVERT: exactly one of params.from (fixed code) or params.fromField (the
              column holding the code), plus params.to. Rules of different choices of one choice group
              may share an outputField; any other duplicate outputField is a 400. No rule may read a
              <to>_rate / <to>_rate_date column. ENUM_MAP: a non-empty mapping, or an empty one with a
              default (fixed value).
            - scraperValues: {scraperId: {name: value}} — max 5 names, values 1-50 characters. Ids of
              this group's scrapers only; a scraper that moved to another group is dropped (warning).
            - expectedVersion: the version read with the GET (0 when there are no rules yet).

        Returns:
          GroupPostProcessRulesDTO (page 0) plus warnings: inputs no scraper declares, condition names
          that are both a column and a scraper value, dropped values.

        Examples:
          - Use when: "convert every scraper's price in group {id} to EUR" -> one CURRENCY_CONVERT rule
            price -> price_eur with params {fromField: "currency", to: "EUR"}
          - Use when: "per 50 g for yarn, per piece for accessories" -> a choice group with conditions
          - Typical price-compare layout: CURRENCY_CONVERT price -> price_eur and sale_price ->
            sale_price_eur (fromField: currency); ONE choice group (branchSet) with one choice per
            product kind (conditions on a per-scraper value such as product_type), whose choices
            share the outputs unit, unit_price, sale_unit_price, unit_price_eur,
            sale_unit_price_eur (a fixed `unit` label is an ENUM_MAP with an empty mapping and a
            default inside each choice; its sourceField must be a column every row has filled,
            such as name — never a scraper value). scraperValues only steer conditions; they are
            never written as a column. Read `warnings` in the response after the save.
          - Don't use when: you want to change one scraper's own rules -> scrapewise_create_scraper

        Error Handling:
          - 400 (CustomerError / validation envelope) on any bound or rule error (the message names it),
            for another customer's or an unknown scraper id in scraperValues, or if no group with this id
            exists for this customer.
          - 409 CONFLICT if expectedVersion is not the current version (reload and retry).
          - 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_post_process_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesthe group's MongoDB ObjectId.
bodyYesThe group's shared rules and the per-scraper values their conditions may read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / id / description
      Added value: +"the group's MongoDB ObjectId."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that this is a full replace (empty rules list clears them), compare-and-set on version with 409 and no changes on staleness, dropped scraperValues with a warning, and per-error-code meaning. Annotations only say non-read-only, idempotent, non-destructive; the description supplies the actual mutation semantics.

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 summary followed by clearly labeled Args / Returns / Examples / Error Handling sections, so an agent can scan. It is long and the "Typical price-compare layout" example is dense, but nearly every line carries non-redundant constraint or routing information.

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?

For a versioned, nested-payload mutation with no output schema, it covers the return shape (page 0 DTO plus warnings), the meaning of each warning, and every error path including reload-and-retry on 409. Nothing an agent needs to call it correctly is missing.

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?

Even at 100% schema coverage the description adds real meaning the schema lacks: max 50 rules, max 3 conditions with op set, branchSet/branch choice-group constraints (2-10 choices, max 10 sets), CURRENCY_CONVERT from/fromField xor and rate-column prohibition, duplicate outputField rules, ENUM_MAP default requirement, scraperValues max 5 names and 1-50 char values, and expectedVersion origin. This is substantially more than the schema expresses.

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?

Opens with a specific verb and resource: "Replaces the group's shared post-processing rules and per-scraper values in one save (compare-and-set on version)." It immediately distinguishes itself from scrapewise_get_scraper_group_post_process_rules (read) and from scrapewise_create_scraper (single-scraper rules).

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 explicit "Use when" scenarios with concrete payload shapes and an explicit "Don't use when: you want to change one scraper's own rules -> scrapewise_create_scraper" exclusion pointing at the correct alternative. The agent does not have to infer routing.

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.