Skip to main content
Glama

batch_extract_web_content

Extract token-optimized Markdown from up to 20 web pages in parallel for docs, product lists, or source comparisons. Returns per-URL results and aggregate token counts.

Instructions

Batch extract token-optimized Markdown from multiple website URLs concurrently, with aggregate token statistics.

What it does Runs the same fast/deep pipeline as extract_web_content across an array of up to 20 URLs in parallel, then returns per-URL results plus a summary (urls attempted, succeeded, failed, total tokens, and per-page token counts).

How to use

  • Use when you need many pages at once — docs, a list of product pages, a set of sources to compare.

  • mode applies to every URL. concurrency (1-10) caps parallel workers; keep it modest on fast machines / low bandwidth.

  • css_selector is applied to all URLs. headers/cookies/proxy apply globally to every request.

  • Each URL is independent: a single failure does not abort the batch (results carry an "error" field for that URL).

Returns Structured JSON with per-url markdown/tokens/error and aggregate totals. Incomplete or empty batches still return a valid result object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoCrawl mode: 'fast' (native HTTP fetch) or 'deep' (headless Playwright browser).fast
urlsYesArray of target website URLs to extract (1-20).
proxyNoOptional HTTP/SOCKS5 proxy URL.
cookiesNoOptional custom HTTP cookies key-value dictionary.
headersNoOptional custom HTTP request headers key-value dictionary.
concurrencyNoMaximum parallel HTTP/browser crawl worker concurrency (default: 3).
max_retriesNoMaximum retry attempts per URL (default: 3).
css_selectorNoOptional CSS selector to filter DOM node across all target URLs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.1
    • changedInput schema / properties / urls / description
      Previous value: -"Array of target website URLs to extract."New value: +"Array of target website URLs to extract (1-20)."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it discharges much of it: failures are isolated per URL ('a single failure does not abort the batch'), results carry an 'error' field, and empty/incomplete batches still return a valid object. It omits auth/credential requirements, rate limits, and timeout behavior, which keeps it short of a 5.

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 one-line summary followed by labelled 'What it does / How to use / Returns' sections; every bullet adds operational value. The section headings cost a little space but the content is dense and non-repetitive, so it stays efficient.

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?

With no output schema AND no annotations, the description must cover both behavior and returns, and it does explain the return shape (per-URL markdown/tokens/error plus aggregate totals). It is complete enough to call correctly, though it leaves prerequisite/auth and rate-limit concerns unstated.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-parameter semantics the schema cannot express: mode/css_selector/headers/cookies/proxy apply to every URL in the array, concurrency (1-10) caps parallel workers with advice to keep it modest, and each URL is independent. That is real meaning beyond the per-parameter docs.

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?

States a specific verb+resource+scope: 'Batch extract token-optimized Markdown from multiple website URLs concurrently, with aggregate token statistics.' It explicitly relates itself to the sibling extract_web_content as the same pipeline applied to an array, so an agent can tell the batch tool from the single-URL tool without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context: 'Use when you need many pages at once — docs, a list of product pages, a set of sources to compare,' and explains how global options (mode, css_selector, headers/cookies/proxy) apply across all URLs, plus concurrency guidance. It does not state when NOT to use it (e.g., 'for a single URL use extract_web_content'), so routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.