Skip to main content
Glama

scrapewise_create_scraper

        Create-or-update by id semantics: if the request body's `id` field is empty, a
        new scraper is created (with limit + plan checks); if `id` is set, the existing
        scraper with that id is replaced. The body must include the full `ScraperDTO`
        shape — partial updates are NOT supported. Validates the config against the
        scraper type's required parameters before persisting.

        Before creating, list the group (scrapewise_get_scraper_list with groupId; open a
        candidate with scrapewise_get_scraper to see its config.sourceConfig.url): one scraper
        per shop and data source — extend the shop's existing scraper instead of adding another.
        A save that carries a `schemaId` (the portal's save sends it too) rebuilds itemsConfig
        from that schema and drops fields that are not in it, and the binding cannot be removed.
        To keep your own fields, create the scraper without a `schemaId`, or put the fields into
        the schema. After a save, read `ruleWarnings` in the response.

        Args:
          - body (ScraperDTO, required): full scraper configuration including
            name, type, sourceConfig (URL or curl), itemsConfig (field selectors),
            pagination, optional schema reference, postProcessRules, group association.
            Set `id` to update an existing scraper; omit to create.

        Returns:
          The persisted ScraperDTO including the assigned (or echoed) id and
          server-stamped fields (createdAt, updatedAt, lastRunState). When `id` was
          empty on the request, the returned DTO carries the freshly minted ObjectId
          — capture it for follow-up calls. On a create, `warning` is set when many
          automations of the same endpoint were created in this group in the last 10
          minutes: the create still succeeded, but a list belongs in ONE automation —
          use `scrapewise_run_scraper_url_list` for the rest.

        Examples:
          - Use when: "create a new scraper for shop X" → body with id omitted
          - Use when: "change scraper {id}'s URL" → call scrapewise_get_scraper
            first, mutate the returned DTO, send it back here
          - Don't use when: you only need to read the config → use scrapewise_get_scraper
          - Don't use when: you want to delete → use scrapewise_delete_scraper
          - Don't use when: you have many URLs to scrape. Do NOT create one scraper per URL.
            Create ONE scraper and attach the addresses as its link list —
            `scrapewise_run_scraper_url_list` does the whole thing in one call, or
            `scrapewise_create_scraper_site` attaches a list to a scraper you already have.

        Error Handling:
          - 400 if body validation fails (missing required fields like `name` /
            `groupId` / `sourceConfig.url`, malformed selectors, invalid pagination
            type, etc.); the error envelope includes which field failed.
          - 400 (CustomerError envelope) if `id` is set on the request but no scraper
            with that id exists for this customer (cross-tenant leak guard) — the
            upsert is rejected rather than silently creating under the foreign id.
          - 402 if customer plan's scrapers-limit is reached on a CREATE (id empty).
          - 401 Unauthorized if no valid Authorization header.
          - 500 INTERNAL on unexpected server error.

[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": {
      "body": "<body>"
    },
    "name": "scrapewise_create_scraper"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesfull scraper configuration including name, type, sourceConfig (URL or curl), itemsConfig (field selectors), pagination, optional schema reference, postProcessRules, group association. Set `id` to update an existing scraper; omit to create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / body / description
      Added value: +"full scraper configuration including name, type, sourceConfig (URL or curl), itemsConfig (field selectors), pagination, optional schema reference, postProcessRules, group association. Set `id` to update an existing scraper; omit to create."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false, idempotent=false) by disclosing full-replacement semantics (no partial updates), the irreversible `schemaId` binding that rebuilds itemsConfig and drops unmapped fields, the post-save `ruleWarnings` requirement, the create-only `warning` on duplicate endpoint automations, and the full error envelope set (400 validation, 400 cross-tenant id guard, 402 plan limit, 401). The 402 limit and foreign-id rejection are precisely the kind of consequences annotations cannot express.

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?

Well front-loaded (semantics, then pre-checks/schema caveat, then Args/Returns/Examples/Error Handling). Some redundancy: the `body` arg description largely restates the schema's own description, and the multi-URL guidance appears twice (Returns and 'don't use when'). Still, nearly every line carries operational value.

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 single-parameter tool wrapping a large nested DTO with no output schema, the definition supplies the missing return contract (persisted DTO, newly minted ObjectId to capture, warning/ruleWarnings semantics) and the error taxonomy. An agent has enough to call it correctly and interpret the response without guessing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents the DTO tree; the description nevertheless adds real meaning the schema cannot: `id` omitted vs set controls create vs replace, the body must be the complete ScraperDTO, and `schemaId` triggers a destructive rebuild of itemsConfig. It does not add per-field guidance on itemsConfig, pagination, or postProcessRules beyond their one-line summary.

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 states a precise verb+resource pair ('Create-or-update ... scraper') and immediately defines the branch condition on `id` (empty = create with plan checks, set = full replace). It distinguishes itself from siblings by naming get/delete/url_list/create_scraper_site in the examples and 'don't use when' list.

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?

Explicit when-to-use and when-not-to-use entries with named alternatives, plus a mandatory pre-check procedure (list the group with groupId, open a candidate with get_scraper) and the 'one scraper per shop/data source' rule. It also directs multi-URL cases to scaprewise_run_scraper_url_list and scrapewise_create_scraper_site rather than creating one scraper per URL.

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.