Skip to main content
Glama
mxchris18
by mxchris18

extract_crawl

Crawl a website and extract structured fields (e.g., title, price) from every page using an LLM, with independent page processing and billing only for successful extractions.

Instructions

Crawl a domain and extract structured data from every page using your LLM. Each page is processed independently — failed pages return an error without aborting the batch. Only successfully extracted pages are billed.

Use this when the user wants structured FIELDS from MULTIPLE pages (e.g. extract title + price from every product page on a site).

⚠️ Each page takes 5–15 seconds. Default is 5 pages. For more than 20 pages, warn the user about wait times and credit usage before proceeding.

PRE-FLIGHT REQUIRED — before calling:

  1. Call verify_provider_key(provider, 'llm') → get live model list

  2. Present models to user, ask them to choose one

  3. Ask: 'Is this a JavaScript-heavy site?' → js_render (not available for extract_crawl, note this)

  4. Confirm max_pages with the user

LLM keys can be omitted if set as environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe root domain to crawl.
schemaYesDict mapping field names to description strings. Example: {"title": "string — the product name", "price": "number — price in USD"}
selectorNoOptional CSS selector applied to every page before extraction.
llm_modelNoLLM model name from verify_provider_key. Do not guess or hardcode. Advanced models (not mini/flash/haiku) use 30k char context — better for long pages.
max_pagesNoMaximum pages to crawl and extract. Default: 5. Maximum: 50. Always confirm with user before setting above 20.
crawl_modeNo'sitemap': reads sitemap.xml. 'spider': follows links from root URL.sitemap
llm_api_keyNoAPI key for the LLM provider. Can be omitted if set as env var.
llm_providerYesLLM provider. One of: 'openai', 'anthropic', 'gemini'. Call verify_provider_key first.
exclude_patternNoSkip URLs containing this substring (e.g. '/blog/').
extract_as_listNoIf true, extracts ALL matching items on each page as a JSON array.
include_patternNoOnly crawl URLs containing this substring (e.g. '/products/').
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses page independence, billing for successful extractions, per-page time estimates, and model context size. Missing rate limits or concurrency details, but the key behaviors are well covered.

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?

Well-structured with a clear purpose sentence, use-case line, warnings, and a numbered pre-flight list. Every sentence adds value; no redundancy. Length is appropriate for the tool's complexity.

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 the main aspects: purpose, usage, pre-flight, timing, billing, parameter guidance. However, it lacks description of the output format (what the extracted data looks like) and does not address error handling for non-page failures. Given no output schema, this is a minor gap.

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 baseline is 3. The description adds significant context: instructions to not hardcode llm_model, to confirm max_pages, and explanation of crawl_mode options. It also describes pre-flight steps that affect parameter usage.

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 clearly states the verb-resource pair 'crawl a domain and extract structured data' and distinguishes from siblings like extract_data (single page) and crawl_site (no structured extraction). It provides a concrete use case example.

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?

Explicitly states when to use (multiple pages with structured fields) and provides a detailed pre-flight checklist including calling verify_provider_key, confirming max_pages, and noting js_render unavailability. Warnings for large page counts are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mxchris18/scrapedatshi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server