Skip to main content
Glama

diogenes-web-scraping-engine-mcp

Web HTML to Clean LLM-Optimized Markdown Engine

extract_clean_markdown
Read-onlyIdempotent

Converts raw HTML pages or live web URLs into clean, boilerplate-free, LLM-optimized Markdown with preserved hyperlinks and headings. Accepts either 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article; for isolating tabular data into structured datasets, use parse_html_tables instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'url' or 'html_content' ('conversion_mode' defaults to 'clean_semantic_article'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_clean_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoOptional web page URL to fetch and parse directly, bypassing an out-of-band fetch step.
html_contentNoRaw HTML string of the web page or document to convert to clean Markdown.
preserve_linksNoWhether to retain anchor hyperlinks and image markdown references in output.
conversion_modeNoMarkdown extraction strategy: clean semantic article, preserve tables/code, or minimal text.

Output Schema

NameRequiredDescriptionDefault
titleYesDocument title extracted from H1 or title tag.
markdownYesClean, sanitized LLM-ready markdown document.
word_countYesNet word count of extracted readable prose.
links_extracted_countYesTotal hyperlinks preserved in document.

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"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "html_content"
      -]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, but the description adds substantial context the annotations do not: statelessness, a 32 KB payload cap, 60 RPM rate limit, L402 payment (10 sats) or '?demo=true' access path, and HTTP 400 on invalid input. The only soft gap is a mild tension with openWorldHint=false given that it fetches arbitrary live URLs, and it doesn't say what a partial/failed extraction looks like (though the output schema covers returns).

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?

Three sentences, front-loaded with purpose, then routing, then operational constraints — no filler. It is dense to the point of being packed (limits, auth, defaults in one sentence), but every clause carries usable information.

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?

For a stateless 4-parameter converter with full schema coverage, annotations, and an output schema, the description covers everything an agent needs: purpose, sibling routing, input alternatives, defaults, size/rate limits, and failure behavior. Return-value explanation is correctly omitted since the output schema handles it.

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 two things the schema does not: that 'url' and 'html_content' are alternatives (either/or), and that 'conversion_mode' defaults to 'clean_semantic_article'. It does not explain 'preserve_links' semantics beyond what the schema already states.

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?

Opens with a specific verb and resource ('Converts raw HTML pages or live web URLs into clean, boilerplate-free, LLM-optimized Markdown') and immediately names the output traits (hyperlinks, headings). It differentiates itself from the closest sibling by naming parse_html_tables as the tool for tabular isolation and scrape_readable_article as the upstream HTML source.

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, pass raw 'html_content' when it comes from scrape_readable_article, and use parse_html_tables instead when the goal is structured table data. The when-not-to-use condition is stated with the named alternative, which is exactly what an agent needs to choose among 12 siblings.

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