Skip to main content
Glama

web_scrape

Read-only

Structured scrape: named CSS fields to JSON — Turn any public web page into a JSON object in one call. Pass fields as name=selector pairs separated by semicolons; add @attr to read an attribute (relative href/src become absolute URLs) and [] to return every match as an array instead of the first. Example: fields=heading=h1;links=a@href[];image=img@src. Returns data{}, which fields matched, match counts and the page title. Up to 25 fields; server-rendered HTML only (no JavaScript). Bad selectors return 400 (not charged). Price: $0.005 USDC (Base, via x402).

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": {
      "url": "<url>",
      "fields": "<fields>"
    },
    "name": "web_scrape"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttps://www.iana.org/help/example-domains
fieldsYesheading=h1;links=a@href[]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, yet the description still adds substantial behavior: a 25-field cap, the no-JavaScript constraint, the 400-on-bad-selector response, the fact that failed calls are not charged, and the $0.005 USDC x402 payment model. That pricing and error-handling detail is exactly the kind of context an agent needs before spending money.

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?

Front-loaded with the core verb and mechanism, then syntax, then limits and pricing, so it reads in priority order with no filler sentences. It is dense to the point of being a single packed block, which slightly hurts scannability.

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?

There is no output schema, so the description explains the return shape itself: a data object, which fields matched, match counts, and the page title. Combined with the syntax rules, limits, and cost, an agent has everything needed to call this correctly on the first try.

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?

Schema coverage is 100% but the schema descriptions are placeholder examples only; the description carries the real semantics — name=selector pairs, semicolon separation, @attr for attributes, [] for arrays, relative href/src becoming absolute, and a worked example. This is meaning the input schema does not provide.

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?

States a specific verb and resource ('Structured scrape: named CSS fields to JSON') plus the mechanism — named CSS fields mapped to a JSON object in one call. That mechanism distinguishes it from generic extraction siblings such as web_extract or web_markdown, so an agent can pick it without opening the schema.

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?

Gives concrete operating conditions: works on any public web page, up to 25 fields, server-rendered HTML only with no JavaScript. The JS limitation is an effective when-not signal. It does not name a specific alternative tool for those cases, which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources