Skip to main content
Glama
OpenSERP

OpenSERP

Official

Extract several URLs

batch_extract

Extract LLM-ready Markdown from up to 20 URLs in one request, avoiding repeated calls and returning per-URL errors so one failed page does not break the batch.

Instructions

Extract LLM-ready content from up to 20 URLs in one request. Prefer this over repeated extract calls when grounding an answer in several pages: it is one round-trip, and a URL that fails returns an item with an error instead of failing the batch. Returns results (url, page_content as Markdown, error when that URL failed; metadata with title, mode_used and, when cut, truncated and total_chars) and meta (requested, succeeded, failed). Cloud: billed per URL like extract; failed and empty URLs are free.

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": {
      "urls": "<urls>"
    },
    "name": "batch_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoPreferred page language, sent as Accept-Language, such as en or de.
modeNoauto (default): fast HTTP fetch, browser render if the page comes back empty. fast: HTTP only. rendered: always a browser, for JavaScript-heavy pages.auto
urlsYesAbsolute URLs to fetch and extract. Duplicates are dropped.
cleanNoArticle-only extraction (default true). Set false for landing pages, docs indexes and dashboards, where content sits in navigation or feature blocks.
regionNoTwo-letter country code applied to every URL, e.g. US or DE. On Cloud this adds 1 credit per extracted URL.
maxCharsNoMax characters of content per URL. Default splits 40000 across the batch (at least 2000 each). Longer pages are cut and marked metadata.truncated.
minRunesNoMinimum text length (in runes) before auto mode escalates to a browser render. 0 uses the built-in floor.
useLlmsTxtNoFor a site root URL, return the site's /llms-full.txt or /llms.txt instead when it has one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.8
    • changedInput schema / properties / clean / description
      Previous value: -"Use article-only extraction when true."New value: +"Article-only extraction (default true). Set false for landing pages, docs indexes and dashboards, where content sits in navigation or feature blocks."
    • changedInput schema / properties / lang / description
      Previous value: -"Language hint."New value: +"Preferred page language, sent as Accept-Language, such as en or de."
    • changedInput schema / properties / minRunes / description
      Previous value: -"Minimum content length (in runes) before auto mode escalates to rendered extraction."New value: +"Minimum text length (in runes) before auto mode escalates to a browser render. 0 uses the built-in floor."
    • changedInput schema / properties / mode / description
      Previous value: -"Extraction strategy."New value: +"auto (default): fast HTTP fetch, browser render if the page comes back empty. fast: HTTP only. rendered: always a browser, for JavaScript-heavy pages."
    • changedInput schema / properties / useLlmsTxt / description
      Previous value: -"Prefer /llms-full.txt or /llms.txt for site roots."New value: +"For a site root URL, return the site's /llms-full.txt or /llms.txt instead when it has one."
  2. Addedv0.1.7

TDQS

A5/5.0
Behavior5/5

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

Since there are no annotations, the description carries the full burden of transparency. It successfully discloses critical behaviors: handling failure within the batch (one URL failure doesn't halt the process), the complete structure of the return value (results and meta), and the impact of length limits (truncation metadata).

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 definition is highly efficient. It front-loads the scope and primary use case and then dedicates the rest of the text to describing essential operational guarantees (failure handling, billing, output structure) without any fluff.

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?

Given that the tool is complex (8 parameters) and lacks formal output/annotation schemas, the description is exceptionally complete. It details input limits, operational guarantees, and the resulting data structure needed for an agent to predict the response.

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?

The description adds crucial contextual meaning beyond the schema definitions. It explains practical implications, such as the effect of `clean` (when NOT to use it), the operational difference between `mode` values, and how `maxChars` leads to truncation metadata.

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 tool clearly defines its purpose (Extract LLM-ready content) and immediately differentiates itself from its sibling tools (like standard 'extract') by defining its batch operation and primary use case.

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 provides explicit usage guidance: 'Prefer this over repeated extract calls when grounding an answer in several pages.' This clearly sets the context for when to use batch_extract versus its sequential alternative.

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