Skip to main content
Glama

scrapewise_get_run_columns_batch

Read-onlyIdempotent
        Batch variant of scrapewise_get_run_columns: returns the distinct top-level column
        names of up to 200 scraper runs of one group in a single request, instead of one
        request per run. Built for the column-mapping canvas, where a large group (100+
        scrapers) opening the builder would otherwise fan out one columns call per scraper
        and exhaust the per-customer rate limit. Column semantics are identical to the
        single-run endpoint: keys are unioned across each run's documents, url and numeric
        fields included, internal keys removed, names sorted. Requires DATA_ENRICHMENT.

        Args:
          - id (string, path param, required): the group's MongoDB ObjectId. Every jobId in
            the body must belong to this group.
          - jobIds (array of strings, body, required): the runs' scraperJobStatusIds, at most
            200, at least 1. Duplicates are deduped server-side. Body shape:
            {"jobIds": ["...", "..."]}.

        Returns:
          `RunColumnsBatchDTO` — `{"columns": {"<jobId>": ["ean", "name", ...]}, "omittedIds":
          [...]}`. `columns` has one entry per processed run (sorted names). `omittedIds`
          lists every requested id that was NOT processed: ids that are unknown, belong to
          another customer, or belong to a different group (lenient read — never a 4xx for
          the whole batch), plus any ids left unprocessed when the server's aggregate time
          budget for the call ran out (partial result, still HTTP 200). Retry omitted ids
          individually via scrapewise_get_run_columns.

        Examples:
          - Use when: "load the columns of every scraper's latest run in group {id} for the
            join/matching canvas" → one call with all latestRunJobIds.
          - Don't use when: you need ONE run's columns → scrapewise_get_run_columns (cheaper,
            cacheable per job).
          - Don't use when: you need the matcher's matchable fields → the matcher
            field-detection endpoint (that one excludes url/numerics).

        Error Handling:
          - 402 if customer plan lacks DATA_ENRICHMENT feature.
          - 400 (CustomerError envelope) if the group is missing or not owned, jobIds is
            empty, jobIds has more than 200 entries, or any id is not a valid ObjectId.
          - Per-id problems (unknown / foreign / wrong-group id) do NOT error — the id is
            returned in omittedIds instead.
          - 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_get_run_columns_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
bodyYes

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?

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses the DATA_ENRICHMENT feature gate, the lenient-read contract where unknown/foreign/wrong-group ids never 4xx but land in omittedIds, and the possibility of a partial 200 result when the server's aggregate time budget expires. The error table (402/400/401/500) and the retry path via the single-run endpoint are exactly the context an agent cannot get from the schema.

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?

Content is front-loaded (purpose and rate-limit motivation first), then cleanly sectioned into Args, Returns, Examples, and Error Handling, with no filler sentences. It is on the long side for a two-parameter tool, and the Returns block somewhat duplicates what the caller could infer, but nothing is genuinely wasted.

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 nested-body, no-output-schema tool, the description covers inputs, response shape (columns map plus omittedIds), partial-result conditions, permission prerequisites, and failure modes — everything needed to invoke it correctly and interpret edge cases. The runtime hint about dynamic output does not conflict, since the omittedIds contract is still stated explicitly.

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?

With 0% schema description coverage, the description carries the full burden and does: it explains id is a group ObjectId that every jobId must belong to, and that jobIds is a 1–200 element array of scraperJobStatusIds with server-side dedupe, including the literal body shape. This adds meaning well beyond the bare JSON schema types.

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 specific verb and resource ('returns the distinct top-level column names') plus the differentiating scope ('up to 200 scraper runs of one group in a single request'), and explicitly frames itself as the batch variant of scrapewise_get_run_columns. An agent can distinguish it from the single-run sibling 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?

It gives an explicit 'Use when' scenario (loading columns for every scraper's latest run in a group for the join/matching canvas) and two 'Don't use when' exclusions that name the correct alternatives (single-run endpoint for one run, matcher field-detection endpoint for matchable fields). The rate-limit rationale also explains why the batch exists.

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.