Skip to main content
Glama

CSS Selector Scraper

dev_scrape_selector

Fetch a web page server-side (SSRF-guarded) and return every element matching a CSS selector as structured JSON: text content, attributes and HTML. Deterministic extraction for agents that need specific parts of a page without reading the whole document. Use this when an agent needs to fetch a page and extract elements matching a CSS selector. x402 price $0.02/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPage URL
limitYesMax elements
selectorYesCSS selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly meets it: it discloses server-side fetching, SSRF guarding, deterministic extraction, and the x402 price/chain ($0.02/call USDC on eip155:8453). It does not cover failure behavior, rate limits, or fetch timeouts, which leaves a modest gap for a network-facing tool.

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?

It is front-loaded with the core action and the return shape, and the price note is useful metadata. The third sentence partially duplicates the first and second ('return every element matching a CSS selector' / 'extract elements matching a CSS selector'), costing a little efficiency.

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?

For a simple 3-parameter read tool with no output schema and no annotations, the description supplies the missing pieces: what is returned (text, attributes, HTML), the safety posture, and the cost model. Only failure/pagination semantics are absent, a minor gap at this complexity level.

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 url, selector, and limit are already documented in the schema; the description adds no syntax, format, or default-value detail for them (e.g., whether limit is capped). Baseline 3 is appropriate when the schema does the heavy lifting.

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 (fetch) and resource (web page) plus a precise extraction behavior (elements matching a CSS selector returned as structured JSON with text, attributes, HTML). It is distinguishable from general-purpose siblings like dev_url_reader or dev_text_extract, though it never names those siblings to sharpen the contrast.

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 third sentence ('Use this when an agent needs to fetch a page and extract elements matching a CSS selector') merely restates the purpose rather than giving real routing guidance. There is no when-not-to-use clause and no explicit alternative named, even though dev_url_reader, dev_text_extract, dev_table_extract, and dev_readability all overlap in this space.

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