Skip to main content
Glama

Extract data with CSS selectors

extract_data

Scrape specific elements from a page. Give a map of field name to CSS selector; each field returns the text of every match. Append '@attr' to a selector to read an attribute instead, e.g. 'a.product@href' or 'img@src'. Cost: 1 credit per call.

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) page URL
limitNoMax matches per field
selectorsYese.g. {"titles": "h2.title", "links": "a.item@href"}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It does add real value by specifying the return shape ('each field returns the text of every match') and a cost signal ('1 credit per call'), both absent from structured fields. However, it omits operationally important traits such as JS-rendering support, no-match/error behavior, and rate limits.

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 tightly written sentences, front-loaded with the core action, then the input format, then the attribute trick and cost. No filler or redundancy; every sentence carries 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 usefully covers the return semantics and the per-call cost, and the schema fully covers inputs. It is nearly complete for a scraping tool, falling short only on failure/pagination behavior that an agent might reasonably want.

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 already documents url, limit, and the selectors map, including the '@href' example. The description reiterates the field-to-selector mapping and @attr syntax, adding little beyond the schema, and it never mentions the limit parameter. Baseline 3 is 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 gives a specific verb and resource: 'Scrape specific elements from a page,' and the CSS-selector mechanism makes it distinguishable from nearby siblings like extract_links and extract_tables. It does not, however, explicitly differentiate itself from scrape_page or extract_content, so an agent still has to infer which is right.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tools are named despite several overlapping siblings (scrape_page, extract_content, extract_links, extract_tables, crawl_site). The text explains how to format the input, not when this tool is the correct choice.

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.