Skip to main content
Glama

diogenes-web-scraping-engine-mcp

Deterministic Edge DOM CSS Selector Scraper & Isolator

isolate_css_selectors
Read-onlyIdempotent

Evaluates CSS selector queries against live URLs or raw HTML DOM trees to extract targeted inner text, outer HTML, or element attributes. Accepts either 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article; for parsing complete table matrices into JSON, use parse_html_tables instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'url' or 'html_content' plus 'selector_query' ('extraction_mode' defaults to 'inner_text'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector_query": "<selector_query>"
    },
    "name": "isolate_css_selectors"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoOptional web page URL to fetch and parse directly, bypassing an out-of-band fetch step.
html_contentNoHTML source markup to query against using CSS selector matching rules.
selector_queryYesCSS selector query expression (e.g., '.pricing-card', '#main h2', 'article p').
extraction_modeNoDOM extraction representation: text content, outer HTML snippet, or attribute key-value map.

Output Schema

NameRequiredDescriptionDefault
elementsYesExtracted textual or markup contents of matched DOM elements.
matched_countYesNumber of DOM nodes matching the provided CSS selector query.
selector_usedYesNormalized CSS selector executed during edge DOM traversal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "Optional web page URL to fetch and parse directly, bypassing an out-of-band fetch step.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "html_content",
      -  "selector_query"
      -]New value: +[
      +  "selector_query"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the description only needs to add operational context — and it does: stateless edge call, 32 KB cap, 60 RPM, optional '?demo=true' or L402 payment of 10 sats, and HTTP 400 on invalid input. The only mild tension is 'against live URLs' versus openWorldHint=false, but the annotation likely refers to a bounded endpoint rather than a description/annotation conflict.

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?

Front-loaded with the core action, then the sibling exclusion, then the operational envelope; every clause carries information. The final parenthetical is dense and slightly run-on, but nothing is redundant filler.

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?

An output schema exists, so return values need no explanation, and the description covers the remaining unknowns for a networked scraping tool: input alternatives, size and rate limits, payment/auth path, and error behavior. An agent has everything needed to call it correctly on the first try.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: url and html_content are alternatives (either/or), html_content should come from scrape_readable_article, and extraction_mode defaults to inner_text — a default absent from the schema. Only the selector syntax itself is left to the schema.

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?

States a specific verb and resource: evaluates CSS selector queries against live URLs or raw HTML to extract inner text, outer HTML, or attributes. It explicitly carves itself out from the sibling parse_html_tables, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit routing: use 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article, and redirect table-matrix extraction to parse_html_tables instead. Both the when-to-use and the when-to-use-something-else are named.

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