Skip to main content
Glama

scrapewise_update_matcher_engine_setup

Destructive
        Replaces the whole engine setup of a group on the newer matching engine with raw (the shape of one
        v2-groups.json group entry), and / or switches the newer engine for the group (engineEnabled). The
        change is stored as a draft; the matcher checks it strictly within about a minute and only a clean
        setup goes live (read it back: status ACTIVE). The group's owner (Full key or portal) changes the fields
        whose writer is customer (GET include=fields); picture fields (imageLayer, imageScraperIds, the whole
        noCodePath block, columns.image and the image role) and engineEnabled are Scrapewise's: leave them out (a PUT that leaves them out keeps them) or send them unchanged. A Scrapewise
        admin key changes everything. To change a few fields use scrapewise_update_matcher_engine_setup_fields
        instead; to restore, PUT an old version's raw (refused for the owner when it differs in a picture field).

        Args:
          - id (string, path, required): the group's id.
          - idempotency_key (string, query): REQUIRED for AI-agent keys. A new value for each new save; the same
            value only to retry that same save. After a 4xx nothing was saved: you may retry with the SAME key.
          - body (required): editVersion (from the last read; required with raw), raw (the whole setup),
            requireIdle (default true: refused while the group's matching or one of its scrapers runs). Do not
            send engineEnabled (admin/support only): from the owner a value other than the current state is 403
            ENGINE_SWITCH_ADMIN_ONLY ("Contact support@scrapewise.ai with group id <id>"); the current state is
            a no-op.
          - customerRef (string, query, optional): only for a Scrapewise admin key in Take Over.

        Returns:
          The small setup answer: status PENDING (the draft waits for the check), editVersion, saveWarnings.
          VALIDATOR_DOWN = your draft is saved and waits for the check; the active setup is unchanged; do not
          resend. A later read with REJECTED = the check refused the draft: the active setup is unchanged; your
          next save starts from the active setup, so send your whole change again (an UNKNOWN_KEY refusal may
          still go live after a matcher update until you save again).

        Examples:
          - Use when: "restore version 4 of group {id}" -> GET version=4, then PUT its raw with the current editVersion.
          - Use when: "put group {id} on the newer engine" -> body {"engineEnabled": true}.
          - Don't use when: you change one source's column -> scrapewise_update_matcher_engine_setup_fields.

        Error Handling:
          - 400 IDEMPOTENCY_KEY_REQUIRED, ENGINE_SETUP_INVALID (bad column name, explicit null),
            UNKNOWN_SCRAPER_ID (a new id that is not a scraper of the group), JOB_NOT_OF_SOURCE (a pinned run of
            another scraper or customer), NOT_ON_NEWER_ENGINE, ENGINE_SETUP_TOO_DEEP, PHOTO_LINE_VALUE_MISSING
            (photoMode confirm / open while a picture line has no threshold). Nothing was changed.
          - 409 VERSION_CHANGED (read again), SETUP_FROM_DB_OFF, NOT_SEEDED (wait a minute),
            OWN_MATCH_RUNNING / SCRAPER_RUN_IN_PROGRESS (wait, retry with the SAME key),
            ENGINE_DISABLE_NEEDS_EMPTY_MATCH, ENGINE_ENABLE_WAITS_FOR_RETRIGGER, TAKE_OVER_ACTIVE,
            IDEMPOTENCY_IN_FLIGHT, ARGS_HASH_MISMATCH, PHOTO_SWITCH_STILL_ON (the owner takes photoMode off
            confirm / veto / score while photo checks are on: switch them off in the match setup first).
          - 403 FIELD_ADMIN_ONLY / FIELD_NOT_CUSTOMER_WRITABLE (a field the owner may not change),
            ENGINE_SWITCH_ADMIN_ONLY (engineEnabled from the owner), NOT_ON_NEWER_ENGINE (the owner's setup for a group not on it); 403 for a read-only key.
          - 413 ENGINE_SETUP_TOO_LARGE (over 256 KB); 503 FIELD_LIST_UNKNOWN.
          - 429 OWNER_EDIT_RATE_LIMIT: more than 10 owner changes of this group in 10 minutes; wait Retry-After.
          - IDEMPOTENCY_IN_FLIGHT (an idempotency conflict): retry after a second.
          - 5xx: read again (scrapewise_get_matcher_engine_setup) before retrying.
          - 401 Unauthorized; 404 unknown group or another customer's group. Nothing was changed in each refusal.

[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>",
      "idempotency_key": "<idempotency_key>",
      "body": "<body>"
    },
    "name": "scrapewise_update_matcher_engine_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesthe group's id.
bodyYesReplace the whole engine setup of a group (and / or switch the newer engine for it).
customerRefNoAdmin keys in Take Over only: the customerUniqueRef of the customer the admin works for. Required then; leave it out otherwise.
idempotency_keyYesRequired for AI-agent keys: a new value per new save, the same value only to retry it.

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A5/5.0
Behavior5/5

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

The annotations already mark this as destructive and non-read-only, and the description adds substantial context beyond them: the change is stored as a draft, the matcher checks it within about a minute, only a clean setup goes live, owner versus admin permissions differ, picture fields and engineEnabled are restricted, and idempotency behavior is explained. It also documents many refusal and retry conditions, which is exactly the behavioral detail an agent needs for a destructive save.

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

Conciseness5/5

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

The description is long but well structured and front-loaded: purpose first, then Args, Returns, Examples, and Error Handling. Every section carries useful information for a complex destructive operation, and there is no obvious 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?

For a complex, destructive, nested-body tool with no output schema, the description covers the save lifecycle, return statuses, permission boundaries, idempotency, and error handling. An agent has enough information to call it correctly and interpret the main outcomes.

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?

Although schema description coverage is 100%, the description adds operational meaning beyond the schema: idempotency_key is required for AI-agent keys and must be new per save but reused only for retries, editVersion is required with raw, requireIdle defaults to true, engineEnabled is admin/support only, and customerRef is limited to admin Take Over. These constraints materially affect correct invocation.

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 description states a specific verb and resource: it replaces the whole engine setup of a group on the newer matching engine and/or switches the engine. It explicitly distinguishes itself from scrapewise_update_matcher_engine_setup_fields, so an agent can tell when this whole-setup tool is the right choice.

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?

It gives explicit when-to-use examples, including restoring a version and enabling the newer engine, and a clear don't-use case pointing to scrapewise_update_matcher_engine_setup_fields for single-field changes. The guidance is specific enough that an agent does not need to infer alternatives.

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.