Skip to main content
Glama
webscraping-ai

WebScraping-AI MCP Server

Official

Extract Fields from a Page

webscraping_ai_fields
Read-only

Extract named values from a web page using an LLM and return structured JSON with exactly the requested keys, each as a string or null.

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. Costs 5 credits on top of the scrape's normal cost. API docs: https://webscraping.ai/docs#ai-fields

Input Schema

TableJSON 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). 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.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. Changed2 schema fields changedv1.2.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / fields / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
  2. 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"
      +]
  3. 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"
      +]
  4. 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 declare readOnlyHint=true, destructiveHint=false, openWorldHint=true, so the safety profile is covered. The description goes beyond that with real behavioral context: the credit surcharge on top of scrape cost, the exact response envelope, the null-when-absent rule, and the flat-string constraint on values. It does not mention rate limits or failure modes when the LLM cannot find a field.

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 sentences, front-loaded with purpose and immediately followed by the response contract and the value constraint. The cost disclosure and docs link are placed last. No filler or restatement of the tool name.

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?

There is no output schema, and the description compensates well by specifying the return envelope, key set, and value types. For a 13-parameter tool whose schema is fully described, this is close to complete; the only real gap is routing guidance relative to siblings, which matters because the sibling set contains several closely related extraction tools.

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 and the schema already documents all 13 parameters including proxy, country, and timeout. The description nonetheless adds meaning the schema lacks: that field values are flat strings or null, never nested, and that lists must be requested as one delimited string. That is genuine elaboration on the `fields` parameter's semantics.

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?

The description names a specific compound operation: scrape a page, then have an LLM extract named values from the page's own content. That is a clear verb+resource and is distinguishable in spirit from question-answering siblings. It stops short of naming any sibling (e.g., webscraping_ai_question or webscraping_ai_selected), so an agent must infer the boundary itself.

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?

There is useful in-band guidance on how to shape requests (request a list as a single delimited string) and a cost note, but no explicit when-to-use versus the other eight webscraping_ai tools and no stated exclusions. Usage is implied by the 'named values, one value per key' framing rather than spelled out.

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