Skip to main content
Glama
v1nvn

readability-mcp

by v1nvn

Extract article to Markdown

extract

Extract the main article from rendered HTML and return clean Markdown with metadata and diagnostics. Uses only the provided HTML with no outbound requests.

Instructions

Extract the main article from already-rendered (post-JavaScript) HTML and return clean Markdown plus metadata and diagnostics. The server fetches nothing: html is the only source, and url (optional) is used solely to absolutize relative links. Hand it the output of document.documentElement.outerHTML from a browser/devtools capture.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gfmNoEnable GitHub-Flavored Markdown: tables, strikethrough, and task lists.
urlNoOrigin URL for absolutizing relative links and images. NEVER fetched — origin context only.
htmlYesAlready-rendered HTML (post-JavaScript), e.g. the result of document.documentElement.outerHTML from a browser/devtools capture. This is the ONLY input the server reads; it makes no outbound requests.
formatNoReturned payload format: 'markdown' (default), 'html', 'text', or 'json' (emits {metadata, content, diagnostics}).markdown
imagesNoImage handling: 'keep' (inline ![alt](url)), 'drop', 'src-only' (bare URL text), or 'reference' (link-reference style).keep
maxCharsNoTruncate markdown/text output at a block boundary; never splits a fenced code block. Ignored for html/json formats.
maxNodesNoHard cap on elements parsed (Readability maxElemsToParse). Safety/perf guard for very large documents.
sanitizeNoRun DOMPurify over the extracted/fragment HTML before conversion (strips scripts, event handlers, and iframes).
selectorsNoScope the extracted/converted content by CSS selector before processing.
extractionNoReadability scoring aggressiveness: 'balanced' (default), 'aggressive', or 'conservative'. Maps to Readability's scorer knobs.balanced
cleanChromeNoStrip browser chrome (scrollbars, consent/cookie banners, fixed nav and overlays) before conversion. These elements poison Readability density scoring and clutter fragment output.
keepClassesNoRetain all CSS classes on extracted nodes. Defaults false, which strips non-language classes.
headingStyleNoMarkdown heading style: 'atx' (#) or 'setext' (underlining with = / -).atx
metadataModeNoPrepend a metadata block to the markdown/text payload: 'none' (default), 'yaml', or 'json'.none
codeBlockStyleNoMarkdown code-block style: 'fenced' (triple backticks) or 'indented' (four-space).fenced
wordsPerMinuteNoReading speed (words per minute) used to compute metadata.readingTimeMin.
minArticleLengthNoMinimum article character length below which extraction falls back to the selector cascade (Readability charThreshold).
readabilityOverridesNoEscape hatch: a record spread verbatim into the Readability options. Unstable and unvalidated; overrides the extraction/keepClasses/maxNodes/minArticleLength knobs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe human/LLM-readable payload — Markdown/html/text, or the serialized JSON when format=json.
metadataYesResolved article metadata. Each field is the first non-empty value across a priority cascade.
diagnosticsYesPipeline telemetry describing what was extracted, sanitized, and removed.
schemaVersionYesStructured-content schema version. Bumps only on breaking shape changes to this object.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed45 schema fields changedv0.5.0
    • addedInput schema / properties / cleanChrome
      Added value: +{
      +  "default": true,
      +  "description": "Strip browser chrome (scrollbars, consent/cookie banners, fixed nav and overlays) before conversion. These elements poison Readability density scoring and clutter fragment output.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / codeBlockStyle / description
      Added value: +"Markdown code-block style: 'fenced' (triple backticks) or 'indented' (four-space)."
    • addedInput schema / properties / extraction / description
      Added value: +"Readability scoring aggressiveness: 'balanced' (default), 'aggressive', or 'conservative'. Maps to Readability's scorer knobs."
    • addedInput schema / properties / format / description
      Added value: +"Returned payload format: 'markdown' (default), 'html', 'text', or 'json' (emits {metadata, content, diagnostics})."
    • addedInput schema / properties / gfm / description
      Added value: +"Enable GitHub-Flavored Markdown: tables, strikethrough, and task lists."
    • addedInput schema / properties / headingStyle / description
      Added value: +"Markdown heading style: 'atx' (#) or 'setext' (underlining with = / -)."
    • addedInput schema / properties / html / description
      Added value: +"Already-rendered HTML (post-JavaScript), e.g. the result of document.documentElement.outerHTML from a browser/devtools capture. This is the ONLY input the server reads; it makes no outbound requests."
    • addedInput schema / properties / images / description
      Added value: +"Image handling: 'keep' (inline ![alt](url)), 'drop', 'src-only' (bare URL text), or 'reference' (link-reference style)."
    • addedInput schema / properties / keepClasses / description
      Added value: +"Retain all CSS classes on extracted nodes. Defaults false, which strips non-language classes."
    • addedInput schema / properties / maxChars / description
      Added value: +"Truncate markdown/text output at a block boundary; never splits a fenced code block. Ignored for html/json formats."
    • addedInput schema / properties / maxNodes / description
      Added value: +"Hard cap on elements parsed (Readability maxElemsToParse). Safety/perf guard for very large documents."
    • addedInput schema / properties / metadataMode / description
      Added value: +"Prepend a metadata block to the markdown/text payload: 'none' (default), 'yaml', or 'json'."
    • addedInput schema / properties / minArticleLength / description
      Added value: +"Minimum article character length below which extraction falls back to the selector cascade (Readability charThreshold)."
    • addedInput schema / properties / readabilityOverrides / description
      Added value: +"Escape hatch: a record spread verbatim into the Readability options. Unstable and unvalidated; overrides the extraction/keepClasses/maxNodes/minArticleLength knobs."
    • addedInput schema / properties / sanitize / description
      Added value: +"Run DOMPurify over the extracted/fragment HTML before conversion (strips scripts, event handlers, and iframes)."
    • addedInput schema / properties / selectors / description
      Added value: +"Scope the extracted/converted content by CSS selector before processing."
    • addedInput schema / properties / selectors / properties / exclude / description
      Added value: +"CSS selectors for boilerplate to remove before extraction (e.g. [\"nav\", \"footer\", \"[role=banner]\"])."
    • addedInput schema / properties / selectors / properties / include / description
      Added value: +"CSS selector restricting extraction to a matching subtree (e.g. \"main\", \"article\", \".post\"). The first match replaces the document body before processing."
    • addedInput schema / properties / url / description
      Added value: +"Origin URL for absolutizing relative links and images. NEVER fetched — origin context only."
    • addedInput schema / properties / wordsPerMinute / description
      Added value: +"Reading speed (words per minute) used to compute metadata.readingTimeMin."
    • addedOutput schema / properties / content / description
      Added value: +"The human/LLM-readable payload — Markdown/html/text, or the serialized JSON when format=json."
    • addedOutput schema / properties / diagnostics / description
      Added value: +"Pipeline telemetry describing what was extracted, sanitized, and removed."
    • addedOutput schema / properties / diagnostics / properties / chromeRemoved
      Added value: +{
      +  "description": "Count of browser-chrome nodes stripped before conversion (scrollbars, consent banners, overlays).",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / diagnostics / properties / extractedNode / description
      Added value: +"DOM root extraction came from: \"readability\" (main path), a fallback selector (e.g. \"article\", \"main\"), or \"fragment\" for html_to_markdown."
    • addedOutput schema / properties / diagnostics / properties / fallbackUsed / description
      Added value: +"True if Readability parse failed and a selector cascade salvaged content. Always true for html_to_markdown."
    • addedOutput schema / properties / diagnostics / properties / imagesResolved / description
      Added value: +"Count of lazy/placeholder images resolved to their real src before conversion."
    • addedOutput schema / properties / diagnostics / properties / readerable / description
      Added value: +"Readability isProbablyReaderable verdict on the document (extract main path only)."
    • addedOutput schema / properties / diagnostics / properties / removedNodes / description
      Added value: +"Net element count removed across the whole pipeline (delta vs. the parsed document)."
    • addedOutput schema / properties / diagnostics / properties / sanitization / description
      Added value: +"Counts of nodes removed by DOMPurify sanitization."
    • addedOutput schema / properties / diagnostics / properties / sanitization / properties / iframes / description
      Added value: +"<iframe> elements removed by sanitization."
    • addedOutput schema / properties / diagnostics / properties / sanitization / properties / scripts / description
      Added value: +"<script> and event-handler nodes removed by sanitization."
    • addedOutput schema / properties / diagnostics / properties / truncated / description
      Added value: +"True if the payload was truncated by maxChars."
    • addedOutput schema / properties / metadata / description
      Added value: +"Resolved article metadata. Each field is the first non-empty value across a priority cascade."
    • addedOutput schema / properties / metadata / properties / byline / description
      Added value: +"Article author(s), resolved from JSON-LD, OpenGraph, <meta>, or Readability."
    • addedOutput schema / properties / metadata / properties / estimator
      Added value: +{
      +  "description": "Name of the heuristic backing tokenEstimate (e.g. \"chars/4\").",
      +  "type": "string"
      +}
    • addedOutput schema / properties / metadata / properties / excerpt / description
      Added value: +"Short article summary produced by Readability."
    • addedOutput schema / properties / metadata / properties / lang / description
      Added value: +"Detected document language."
    • addedOutput schema / properties / metadata / properties / publishedTime / description
      Added value: +"Publication timestamp resolved from JSON-LD, <meta>, or <time> elements."
    • addedOutput schema / properties / metadata / properties / readingTimeMin / description
      Added value: +"Estimated reading time in minutes, derived from wordCount and wordsPerMinute."
    • addedOutput schema / properties / metadata / properties / siteName / description
      Added value: +"Publishing site name, resolved from OpenGraph or <meta>."
    • addedOutput schema / properties / metadata / properties / title / description
      Added value: +"Article title, resolved by priority cascade (JSON-LD → OpenGraph → Twitter → <meta> → Readability → <title>)."
    • addedOutput schema / properties / metadata / properties / tokenEstimate
      Added value: +{
      +  "description": "Rough output token count (chars/4 by default) for context budgeting.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / metadata / properties / url / description
      Added value: +"The url passed in (origin context), or the article canonical URL when discoverable."
    • addedOutput schema / properties / metadata / properties / wordCount / description
      Added value: +"Number of whitespace-separated words in the extracted text."
    • addedOutput schema / properties / schemaVersion / description
      Added value: +"Structured-content schema version. Bumps only on breaking shape changes to this object."
  2. Changed1 schema field changedv0.4.0
    • addedOutput schema / properties / diagnostics / properties / imagesResolved
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  3. First observedv0.1.0

TDQS

A4.2/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 burden. It discloses that the server makes no outbound requests and that url is only for absolutizing links. However, it does not mention failure modes, performance traits, or safety (e.g., no destructive actions). The description is adequate but could be more explicit about behavioral expectations.

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?

The description is extremely concise: two sentences that immediately convey purpose, input constraints, and practical usage. No wasted words, front-loaded with key 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?

Given the tool's complexity (18 parameters, nested objects) and presence of an output schema, the description is sufficiently complete for an agent to understand when and how to use it. It covers the core purpose and input preparation. Could mention that it uses Readability under the hood, but not necessary.

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 baseline is 3. The description adds value by explaining the overall usage (e.g., 'Hand it the output of ...' for html parameter) and reinforcing constraints. This goes beyond the schema descriptions, justifying a higher score.

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 clearly states the tool extracts the main article from rendered HTML and returns clean Markdown plus metadata. It specifies the verb 'extract', the resource 'main article', and output format. It also distinguishes from siblings like html_to_markdown by focusing on article extraction, not arbitrary conversion.

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 gives clear context: use when you have post-JavaScript HTML from browser devtools, and the server fetches nothing. It provides guidance on how to prepare input (use document.documentElement.outerHTML). However, it does not explicitly state when NOT to use or contrast with siblings beyond implicit differentiation.

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

Install Server

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/v1nvn/readability-mcp'

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