Skip to main content
Glama

x402 Structured Data & URL Scraper

extract_from_url

Read-only

Fetch a public webpage URL, strip HTML/navigation boilerplate, and return strict typed JSON matching target_schema in one atomic step. Use instead of generic scrapers to save context-window tokens and avoid post-processing. Best for articles, product pages, docs, and listings (static HTML; does not solve CAPTCHAs).

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>",
      "target_schema": "<target_schema>"
    },
    "name": "extract_from_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic HTTP or HTTPS webpage URL to fetch and parse.
target_schemaYesJSON object defining desired output keys and expected types.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / target_schema / description
      Previous value: -"JSON object defining desired output keys and expected types (e.g., string, number, boolean, array)."New value: +"JSON object defining desired output keys and expected types."
    • removedInput schema / properties / target_schema / examples
      Removed value: -[
      -  {
      -    "in_stock": "boolean",
      -    "price_usd": "number",
      -    "product_name": "string"
      -  }
      -]
    • removedInput schema / properties / url / examples
      Removed value: -[
      -  "https://example.com/pricing"
      -]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint) and reach (openWorldHint), and the description adds real context: boilerplate stripping, one atomic step, public-URL-only scope, and the CAPTCHA/static-HTML limitation. It omits operational details like rate limits, payload size caps, and timeouts for a network fetch.

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?

Three tight sentences, front-loaded with the core action and followed by the differentiator and the limitation. No filler or repeated information.

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?

With no output schema, the description adequately explains that the return value is JSON conforming to target_schema. For a network fetch, notes on failure modes (timeouts, non-public URLs, large pages) would complete the picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented in structured form. The description restates that target_schema governs the output shape, which is useful framing but not new syntax or constraint detail beyond the schema.

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 chain (fetch, strip, return) on a specific resource (public webpage URL) with a defined output (strict typed JSON matching target_schema). It explicitly distinguishes itself from generic scrapers, so an agent can pick it without reading 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 a clear when-to-use rule ('use instead of generic scrapers to save context-window tokens') plus a best-for content list (articles, product pages, docs, listings). It also states a hard exclusion (static HTML only, no CAPTCHA solving), though it does not route among the named siblings.

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