Skip to main content
Glama
webscraping-ai

WebScraping-AI MCP Server

Official

Extract Fields from a Page

webscraping_ai_fields
Read-only

Scrape a web page and use an LLM to extract specified named fields from its own content, returning a flat JSON object with exactly the requested keys and null for missing values.

Instructions

Scrape a web page and have an LLM extract named values from it, using only the page's own content. Returns JSON of the form {"result": {: }} with exactly the requested keys; each value is a string, or null when the page doesn't contain it. Values are never nested objects or arrays, so request a list as a single delimited string. The LLM step is billed on top of the scrape's normal cost. API docs: https://webscraping.ai/docs#ai-fields

Input Schema

NameRequiredDescriptionDefault
jsNoExecute on-page JavaScript using a headless browser (false by default).
urlYesURL of the target page.
proxyNoType of proxy: datacenter, residential, or stealth (datacenter by default). Residential and stealth requests cost more than datacenter — see the pricing page.datacenter
deviceNoType of device emulation.
fieldsYesDictionary of field names with instructions for extraction.
countryNoCountry of the proxy to use (US by default).
timeoutNoMaximum web page retrieval time in ms (20000 by default, maximum is 30000).
wait_forNoCSS selector to wait for before returning the page content.
js_scriptNoCustom JavaScript code to execute on the target page.
js_timeoutNoMaximum JavaScript rendering time in ms (3000 by default).
custom_proxyNoYour own proxy URL in "http://user:password@host:port" format.
error_on_404NoReturn error on 404 HTTP status on the target page (false by default).
error_on_redirectNoReturn error on redirect on the target page (false by default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / fields / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / proxy / description
      Previous value: -"Type of proxy: datacenter, residential, or stealth (datacenter by default). Use residential if the site restricts datacenter traffic, or stealth for the most heavily protected sites with advanced anti-bot detection. Residential and stealth requests cost more than datacenter — see the pricing page."New value: +"Type of proxy: datacenter, residential, or stealth (datacenter by default). Residential and stealth requests cost more than datacenter — see the pricing page."
  2. Changed2 schema fields changedv1.2.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / fields / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
  3. Changed1 schema field changedv1.0.5
    • changedInput schema / properties / country / enum
      Previous value: -[
      -  "us",
      -  "gb",
      -  "de",
      -  "it",
      -  "fr",
      -  "ca",
      -  "es",
      -  "ru",
      -  "jp",
      -  "kr",
      -  "in"
      -]New value: +[
      +  "us",
      +  "gb",
      +  "de",
      +  "it",
      +  "fr",
      +  "ca",
      +  "es",
      +  "ru",
      +  "jp",
      +  "kr",
      +  "in",
      +  "hk",
      +  "tr"
      +]
  4. Changed2 schema fields changedv1.0.4
    • changedInput schema / properties / proxy / description
      Previous value: -"Type of proxy, datacenter or residential (datacenter by default)."New value: +"Type of proxy: datacenter, residential, or stealth (datacenter by default). Use residential if the site restricts datacenter traffic, or stealth for the most heavily protected sites with advanced anti-bot detection. Residential and stealth requests cost more than datacenter — see the pricing page."
    • changedInput schema / properties / proxy / enum
      Previous value: -[
      -  "datacenter",
      -  "residential"
      -]New value: +[
      +  "datacenter",
      +  "residential",
      +  "stealth"
      +]
  5. Addedv1.0.2

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only and open-world, so the description focuses on what they can't say: exact return shape, null for missing values, no nested objects/arrays, and that the LLM step adds cost on top of the scrape. That cost disclosure and the flat-value constraint are genuinely useful. Pagination/rate-limit details are absent, but for a single-page scrape they matter less.

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?

Four tight sentences: purpose first, then return contract, then the negative constraint on nesting, then cost and docs. No filler, and the docs link is placed at the end where it belongs.

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?

No output schema exists, and the description fully specifies the return envelope and per-value type/null semantics, which is exactly what's needed. The 13 scrape-mechanics parameters (proxy, js, timeout) are left to their schema descriptions, which is appropriate given 100% 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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema for the key `fields` parameter: values are always strings, never nested, so a list must be requested as one delimited string. That directly changes how an agent should phrase field instructions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb plus resource: scrape a page and have an LLM extract named values, restricted to the page's own content. The 'fields' framing differentiates it from siblings like webscraping_ai_question and webscraping_ai_text, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied by 'extract named values' but there is no explicit when-to-use or when-not-to-use guidance, and no comparison against webscraping_ai_question or webscraping_ai_text. The 'using only the page's own content' clause narrows behavior but is not a routing rule.

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