Skip to main content
Glama
Llamatron2112

mcp-dom-extract

discover_selectors

Find CSS selectors for web page elements by matching their text against target keywords, returning candidate selectors with short samples to support precise data extraction.

Instructions

Fetches a web page and finds CSS selectors for elements whose text matches the given keywords. The model describes what it is looking for with keywords; the server returns candidate selectors with short samples, without the full page entering the context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
targetsYesWhat to look for: a name plus keywords matched case-insensitively against element text
max_candidatesNoMaximum number of candidate selectors returned per target
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It discloses that the page is fetched, only candidate selectors with short samples are returned, and the full page does not enter the context. It does not cover failure modes or auth, but the key behavior is well explained.

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 with no filler. The core function is front-loaded, and the behavioral caveat about context is placed second. Every clause earns its place.

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 three-parameter tool with no output schema, the description covers the inputs, the main behavior, and the output format (candidate selectors with short samples). It lacks only minor details like failure behavior, which are not essential for correct invocation.

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 descriptions already cover targets and max_candidates (67% coverage), and url is self-explanatory. The tool description does not add parameter-specific meaning beyond what the schema already states, so it neither helps nor hurts.

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: fetch a web page and find CSS selectors for elements whose text matches given keywords. It clearly distinguishes this from sibling tools like extract_page_text and probe_selectors by describing the matching mechanism and the output shape.

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 conveys a clear use case: the model provides keywords and the server returns candidate selectors without loading the full page into context. This implies when to use it, but it does not explicitly name alternatives or state when not to use it.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Llamatron2112/mcp-dom-extract'

If you have feedback or need assistance with the MCP directory API, please join our Discord server