Skip to main content
Glama

scrape-dom

Scrape web pages and extract structured data using CSS selectors, with support for pagination and low-level DOM operations.

Instructions

Scrape a URL, parse with jsdom, and extract data via structured DSL or low-level operations. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to scrape
methodNoHTTP methodGET
extractNoStructured extraction DSL. Mutually preferred over operations for item scraping
headersNoCustom HTTP headers
retriesNoRetry attempts (0-10)
timeoutNoTimeout in ms (1000-120000)
operationsNoLow-level DOM operations to run on each page (pipeline mode)
paginationNoFollow next-page links and accumulate results

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It discloses that the tool fetches a URL, parses via jsdom, supports structured and low-level extraction, and pagination. However, it does not disclose limitations such as whether JavaScript is executed, output shape, or that pagination triggers multiple network requests, making the disclosure adequate but minimal.

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?

Two short sentences with no filler. The core action and key capabilities are front-loaded, and every phrase earns its place given the tool's complexity.

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?

The schema is rich and fully documents the DSL, operations, and pagination. The description provides a high-level orientation that matches that complexity. It does not explain return values or JavaScript execution caveats, but given the schema's depth, the description is mostly complete.

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. The description adds cross-cutting meaning by grouping `extract` as 'structured DSL' and `operations` as 'low-level operations', and by calling out pagination as a capability, which goes beyond any single schema parameter description.

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?

The description states a specific verb and resource ('Scrape a URL'), names the parsing engine ('parse with jsdom'), and highlights the two extraction modes plus pagination. This clearly identifies the tool's function and helps distinguish it from simpler siblings like 'scrape' or 'dom'.

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?

The description implies usage through action phrases but provides no explicit when-to-use guidance or exclusions. It does not mention when to prefer scrape-dom over the sibling tools 'scrape' or 'dom', leaving the choice to inference.

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