Skip to main content
Glama
scrapedatshi

scrapedatshi-mcp

Official
by scrapedatshi

extract_data

Extract specific fields from a web page (e.g., product name, price) using a custom schema. The LLM returns structured JSON data.

Instructions

Scrape a URL and extract structured data matching a user-defined schema using an LLM. Returns a JSON object (or array if extract_as_list=true).

Use this when the user wants specific FIELDS from a page (e.g. product name, price, stock status; article author, date, summary).

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 page or SPA?' → js_render

  4. Present Contextual Retrieval is NOT applicable here (extraction only)

LLM keys can be omitted if OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY is set in the MCP environment config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe web URL to scrape and extract structured data from.
schemaYesDict mapping field names to description strings. Example: {"title": "string — the product name", "price": "number — price in USD", "in_stock": "boolean — whether in stock"}
selectorNoOptional CSS selector to target a specific section before extraction.
js_renderNoUse headless browser to render JS before extracting. Ask the user before enabling.
llm_modelNoLLM model name from verify_provider_key. Do not guess or hardcode. Use an advanced model (not mini/flash/haiku) for long-form pages like documentation or legal docs.
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.
click_selectorNoCSS selector for an element to click after page load (tabs, accordions, load-more). Only used when js_render=true.
extract_as_listNoIf true, extracts ALL matching items on the page as a JSON array. Use for listing pages (product catalogues, article feeds).
Behavior3/5

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

No annotations provided. Description discloses LLM usage, pre-flight requirements, and environment key fallback, but lacks information on costs, rate limits, error handling, or privacy implications.

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?

Description is well-structured with sections and front-loaded with core action. However, some redundancy in pre-flight steps and could be slightly more concise.

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 pre-flight prerequisites, parameter details, and return format. Lacks information on error handling or output behavior on LLM failure, but overall sufficient for a tool with good schema coverage.

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?

100% schema coverage, but description adds valuable context: pre-flight for llm_model and js_render, extract_as_list usage, and example for schema parameter. Clarifies that llm_model should not be hardcoded.

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?

Description clearly states it scrapes a URL and extracts structured data using an LLM. Distinguishes from siblings by specifying it's for specific fields, not raw scraping or crawling.

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?

Explicit pre-flight steps are provided, including calling verify_provider_key, asking about js_render, and when to use extract_as_list. However, no explicit when-not-to-use or alternatives among siblings.

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/scrapedatshi/scrapedatshi-mcp'

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