Skip to main content
Glama

Extract structured data from a page

domscout_extract_data

Extract structured data from any public webpage by defining CSS selectors for named fields, returning typed JSON with per-field status to pinpoint invalid selectors or missing elements.

Instructions

Costs 2 credits. Pulls named fields off a page using CSS selectors and returns typed JSON. Each field reports found/missing/invalid_selector separately, so a partial result tells you which selector was wrong rather than failing the whole call. Requires Pro or above.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe page to load. Must be http(s) and publicly reachable. Credentials in the URL (https://user:pass@host) are rejected; these tools capture as an anonymous visitor, so use the REST API directly if the page needs authentication.
delayNoExtra milliseconds to wait after load.
fieldsYesField name → { selector, type, attribute?, all? }. type is one of text, number, boolean, attribute, html, url, list. Set all:true to collect every match instead of the first. At most 100 fields.
waitForSelectorNoWait for this CSS selector to appear before capturing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral disclosure burden. It explains per-field found/missing/invalid_selector reporting and that a partial result does not fail the whole call, plus the credit cost. This is valuable behavioral context beyond what the input schema provides.

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 short sentences deliver cost, core functionality, failure semantics, and access requirements with no filler. Every sentence earns its place, and the most decision-relevant facts are front-loaded.

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?

The combination of the schema and description gives an agent enough to call this correctly: how extraction works, field-level status reporting, cost, and access requirement. URL/auth constraints live in the schema, and the output nature is described in the description despite the absence of an output schema.

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?

The input schema already documents all four parameters in detail (100% coverage), so the baseline is 3. The description adds general context about CSS selectors and typed JSON but does not add parameter-level details beyond the schema, which is acceptable given full coverage.

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 action ('Pulls named fields off a page'), the mechanism (CSS selectors), and the output (typed JSON). This clearly differentiates it from siblings like domscout_extract_markdown, which returns markdown rather than structured fields.

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?

The description gives clear context for when to use the tool: extracting named fields from a page as typed JSON. It also adds practical constraints—2 credits and Pro-or-above requirement—so an agent can decide if it is eligible. It does not explicitly name alternatives or say when not to use it, so not a 5.

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