Skip to main content
Glama

scrapewise_get_scraper_sample_data

Read-onlyIdempotent
        Runs the scraper synchronously against its configured source URLs (capped to a
        FIRST batch / FIRST page only — NOT a full run; no pagination expansion) and
        returns the parsed sample rows immediately. Use to validate a scraper config
        visually before scheduling a full run via scrapewise_run_scraper. Row count is
        not capped to a fixed number — it is whatever a single first-batch fetch yields
        (typically single-digit to mid-double-digit, depending on the source site's
        page structure and the scraper's `itemsConfig` selectors). Each row is a
        dynamic key-value bag.

        Args:
          - id (string, path param, required): the scraper's MongoDB ObjectId.
          - useCache (boolean, query param, optional, default false): if true, returns
            the most-recent cached sample within the cached-sample TTL window
            (typically 1 hour) — much faster but may be stale.
          - preferPersisted (boolean, query param, optional, default false): if true and the
            scraper has a latest data-bearing run, returns a fast sample of that run's
            persisted rows instead of a live re-scrape; falls back to the live scrape when
            the scraper has never produced data.

        Returns:
          `List<Map<String, Any>>` — each Map represents one scraped row keyed by the
          scraper's configured field names. Values are typically strings; numeric and
          boolean fields are post-processed if rules are configured.

        Examples:
          - Use when: "show me what scraper {id} produces right now" → useCache=false
          - Use when: "give me a quick preview" → useCache=true (faster, possibly stale)
          - Don't use when: you want the full historical dataset → use
            scrapewise_get_scraper_data_group on the scraper's group

        Error Handling:
          - 400 (CustomerError envelope) if no scraper with the given id exists for this customer.
          - 502 if the source site is unreachable (rare; check SSRF deny-list).
          - 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_sample_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
useCacheNo
forceTopTierNo
preferPersistedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description layers genuinely new behavioral context on top: cached-sample TTL (~1 hour), the preferPersisted fast path with its fallback to live scraping, that row counts are unbounded and depend on site page structure and itemsConfig selectors, plus a documented error taxonomy (400/401/500/502 and SSRF deny-list). One minor tension: annotations say openWorldHint=false while the description describes live re-scraping of remote source sites, which an agent might expect to be slow or rate-limited; worth noting but not a direct contradiction since URLs come from pre-configured scraper settings.

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?

Despite its length, the block is well-sectioned (purpose, Args, Returns, Examples, Error Handling) with the scope cap front-loaded in the first sentence. The parenthetical about typical row counts is slightly wordy but earns its place by preventing an agent from expecting a fixed page size.

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

Completeness4/5

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

Covers nearly everything an agent needs for a live-scrape-preview tool with no output schema: sample shape ('each Map represents one scraped row keyed by configured field names', dynamic key-value bag), caching behavior, error codes, and the alternative for full data. The only real gap is the undocumented forceTopTier parameter.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry parameter meaning — and it does well for id, useCache (TTL window, staleness tradeoff) and preferPersisted (fallback behavior). However, the fourth schema parameter forceTopTier appears nowhere in the description, leaving one of four parameters completely undocumented in both places.

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 opens with a concrete verb+resource pair ('Runs the scraper synchronously against its configured source URLs') and immediately bounds scope with 'capped to a FIRST batch / FIRST page only — NOT a full run; no pagination expansion'. It also names the sibling it should not be confused with (scrapewise_run_scraper for full runs), so an agent can distinguish it from adjacent scrape/read tools without opening any 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 an explicit use case ('validate a scraper config visually before scheduling a full run'), concrete when-to-use examples that map to parameter settings (useCache=false for 'right now', useCache=true for 'quick preview'), and an explicit don't-use case routing the agent to scrapewise_get_scraper_data_group for full historical data.

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.