Skip to main content
Glama
paulet4a-commits

WebDataTools Domain & website intelligence MCP server

css_selector_extractor

Extract CSS selector data from any page without a browser, returning text, HTML, attributes, or match counts—one row per URL for scraping and site checks.

Instructions

Web Scraper pulls any CSS selector off any page, returning text, HTML, attributes or match counts — one row per URL, no browser required. Billed to your own Apify account: ~$0.002 per Page (Apify free-plan price, lower on paid plans).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYesURLs — Enter one URL per row to fetch and run the selectors against, e.g. https://example.com. Each URL gets exactly one result row, even if the fetch fails. Example: ["https://example.com"].
selectorsYesSelectors — Enter the fields to extract as a JSON array of {"name", "selector", "type"} objects. "type" is one of text, html, attr or count; an "attr" entry also needs "attribute" (e.g. {"name":"canonicalUrl","selector":"link[rel='canonical']","type":"attr","attribute":"href"}). Capped at 25 entries per run. Example: [{"name":"title","selector":"h1","type":"text"}].
firstMatchOnlyNoFirst match only — Keep this on to return only the first element each selector matches. Turn it off to return every match (up to Max matches per selector) as an array.
trimWhitespaceNoTrim whitespace — Keep this on to collapse runs of whitespace and trim the ends of extracted text and attribute values. Turning it off returns text and attr values exactly as found in the page.
maxMatchesPerSelectorNoMax matches per selector — Enter the most matches to return for one selector when First match only is off, e.g. 20. Does not limit the reported match count, only how many values are returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It adds useful billing and execution context (charged to the user's Apify account, no browser required) and notes one row per URL, but omits failure behavior, rate limits, and explicit read-only safety details.

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 tightly written sentences front-load the core purpose and then add pricing context. Every sentence earns its place by clarifying capability, output shape, or cost, with no redundancy.

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?

Given no output schema, the description does well to describe return types and row structure, and it covers billing and browserless execution. It could be more complete by explaining error/failure output format or authentication specifics, but the essentials are present.

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 description coverage is 100%, so the schema fully documents all five parameters. The description adds no parameter-specific syntax or constraints beyond what is already in the schema, making the baseline 3 appropriate.

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 states a specific verb and resource: pulling CSS selectors off pages, with return types (text, HTML, attributes, match counts) and deployment context (no browser required). It is clear but does not explicitly differentiate this tool from sibling scrapers like contact_extractor or tech_stack_detector.

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?

Usage is implied by 'pulls any CSS selector off any page', but there is no explicit guidance on when to prefer this tool over alternatives, nor any exclusions. The description gives enough context to infer it is for custom selector-based extraction, but lacks when/when-not instructions.

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