Skip to main content
Glama

slimdown

Web pages slimmed down to the Markdown an AI needs.

slimdown reads a web page and returns its main content as Markdown, in as few tokens as it can. It drops navigation, footers, cookie banners, share bars, ads, image embeds and tracking parameters. It shortens links to the same site to their path. Ask for a topic with focus and you get only the sections about it.

It comes as a Python library, a CLI and an MCP server. It runs locally and needs no account or key. MIT licensed.

pip install "slimdown @ git+https://github.com/cventuresza-tech/slimdown"
slimdown https://docs.python.org/3/library/asyncio-task.html --focus "timeouts" --tokens

Benchmark

These are 39 public pages: docs, Wikipedia, essays, blogs, news front pages, government and health pages, package and repository pages, a shop page and marketing pages. Tokens were counted with OpenAI's o200k_base.

Content kept compares tools without letting any one of them define the content. A sentence of eight or more words counts as content when most of six tools' outputs contain it. The score is the share of those sentences a tool's output contains.

Tool

Total tokens

Median per page

Content kept

slimdown

236,550

3,191

95.0%

Crawl4AI (fit_markdown, pruning filter)

267,213

3,665

92.9%

Jina Reader (r.jina.ai)

286,319

4,539

88.5%

Firecrawl (onlyMainContent)

421,856

5,536

90.1%

MarkItDown

515,967

9,100

99.5%

Crawl4AI (raw_markdown)

559,391

9,451

97.3%

Trafilatura (markdown, links on)

219,496

2,257

87.8%

What this shows:

  • slimdown keeps the most content of the main-content tools. It uses 44% fewer tokens than Firecrawl, 17% fewer than Jina Reader and 11% fewer than Crawl4AI's filtered output.

  • MarkItDown and Crawl4AI's raw output keep almost everything because they keep everything. That includes menus and footers, at more than twice the tokens.

  • Trafilatura is the leanest that keeps links, 8% under slimdown, but drops the most content. Without links, Trafilatura uses 161,631 tokens and keeps 88.1%; slimdown --no-links uses 178,964 and keeps 95.0%.

Run 5 Oct 2026. Every local tool converted the same HTML, fetched once. Jina Reader and Firecrawl fetch pages themselves; Jina failed on 3 pages and Firecrawl on 1. Three pages that block plain HTTP (Stack Overflow, timeanddate, IMDb) were left out, because every HTML converter fails on them equally.

Reproduce it with uv run --group bench python bench/run.py. The script and page list are in bench/, and per-page numbers are in bench/results.json.

Related MCP server: cleanfetch

Install

Not on PyPI yet: install from GitHub.

pip install "slimdown @ git+https://github.com/cventuresza-tech/slimdown"            # library and CLI
pip install "slimdown[tokens] @ git+https://github.com/cventuresza-tech/slimdown"    # exact token counts (tiktoken); otherwise estimated
pip install "slimdown[mcp] @ git+https://github.com/cventuresza-tech/slimdown"       # the MCP server
uvx --from git+https://github.com/cventuresza-tech/slimdown slimdown https://example.com   # or run it without installing

Python 3.10+.

CLI

slimdown https://en.wikipedia.org/wiki/Markdown                 # Markdown on stdout
slimdown https://stripe.com/blog/idempotency -f "retries" -t     # only the sections about retries, token count on stderr
slimdown https://example.com/page --no-links                     # link text only, no addresses
slimdown page.html --url https://example.com/page                # HTML you already have
curl -s https://example.com | slimdown - --url https://example.com
slimdown https://example.com --json                              # status, title, tokens, sections kept

Python

from slimdown import slim, html_to_markdown

page = slim("https://fastapi.tiangolo.com/tutorial/first-steps/", focus="run the server")
page.status      # "ok", "needs_browser", "blocked", "not_found", "unsupported" or "error"
page.markdown    # the sections about running the server
page.tokens      # how many tokens that is
page.note        # what happened, when something did

# HTML from your own headless browser or crawler:
md = html_to_markdown(html, url="https://example.com/article")

MCP server

Give any MCP client, such as Claude Code, Claude Desktop, Cursor or Codex, a read_page tool:

{
  "mcpServers": {
    "slimdown": { "command": "uvx", "args": ["--from", "slimdown[mcp] @ git+https://github.com/cventuresza-tech/slimdown", "slimdown-mcp"] }
  }
}

For Claude Code: claude mcp add slimdown -- uvx --from "slimdown[mcp] @ git+https://github.com/cventuresza-tech/slimdown" slimdown-mcp.

read_page(url, focus?, links?, country?) returns the page's lean Markdown under a short header: source, status and token count.

What it does to a page

  1. Finds the main content. It uses <main>, <article> or [role=main] when they hold the page's text, and otherwise the body without its furniture: headers, footers, navigation, asides, cookie and consent banners, share bars, newsletter boxes, ads and modals.

  2. Writes lean Markdown. It keeps headings, lists, tables, code blocks and links, and drops image embeds (a linked image keeps its alt text). It also strips tracking parameters (utm_*, fbclid, gclid…) and permalink marks.

  3. Shortens same-site links to their path (/docs/install). That's the same information in fewer tokens, resolvable against the page's address.

  4. Drops blocks that repeat word for word. Responsive pages often render a sidebar twice, one copy hidden by CSS.

  5. Focus, without a model. It splits the page at headings, ranks the sections against your question with BM25, and returns the best ones in page order. It discounts link lists and lifts repeated items such as reviews or results.

Pages that need more than plain HTTP

slimdown reads what a plain HTTP request gets. Three kinds of page need more:

  • apps that build their content with JavaScript;

  • sites behind a bot wall;

  • pages that differ by country.

slimdown says which, and stops:

$ slimdown https://excalidraw.com/
slimdown: needs_browser · 0 tokens
https://excalidraw.com/: needs a browser (an app shell with little text: the page is built by JavaScript). slimdown
reads plain HTML only. Set SKRYP_API_KEY to read it through Skryp (a real browser, unblocking, any country; free
credits at https://skryp.dev), or render it yourself and pass the HTML to slimdown.html_to_markdown().

Set SKRYP_API_KEY and those pages are read through Skryp instead: a real browser, unblocking, and exits in many countries. The Markdown comes back from the same engine. A free account includes 1,000 credits a month.

export SKRYP_API_KEY=sk_...
slimdown https://www.example-shop.com/product/123 --country de

Safety

slimdown refuses addresses that resolve to private, loopback or link-local networks at every redirect, unless you pass allow_private=True or --allow-private. An AI agent reading pages for someone can be talked into requesting http://169.254.169.254/ or a router's admin page. Responses are capped at 10 MB.

Licence

MIT. Made by Skryp, which runs the same engine as a hosted API and MCP server for the pages plain HTTP cannot reach.

Available Tools

1 tool
read_pageA

Read a web page as lean Markdown: its main content only, in as few tokens as possible.

url: the page (http or https). focus: return only the sections about this, e.g. "pricing" or "installation". Saves most of the page's tokens. links: false keeps link text but drops the addresses. country: two-letter code to read the page as seen from that country (needs SKRYP_API_KEY). Links to the same site are shortened to their path; resolve them against the Source line.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
focusNo
linksNo
countryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does well: it discloses the output shape (lean Markdown, main content only), link post-processing (same-site links shortened to paths, resolved against the Source line), and an auth requirement for the country parameter (SKRYP_API_KEY). It omits failure modes, rate limits, or behavior on pages that resist extraction.

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 tool's purpose in the first sentence, then a compact parameter glossary with no filler. Slightly clipped phrasing ('country: two-letter code to read the page as seen from that country') reads as notes rather than prose, but nothing is wasted.

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?

An output schema exists, so return values need not be described, and the description nonetheless explains the output character and the link-resolution convention an agent needs to interpret results. What remains thin is edge-case behavior and the practical limits of the extraction.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it fully does: url is defined as http/https, focus is defined with a concrete example and its token-saving effect, links is explained in terms of what is kept vs dropped, and country is defined as a two-letter code with its credential requirement. Every one of the four parameters gains meaning absent from 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 (read) and resource (web page) plus the transformation applied: lean Markdown, main content only, minimal tokens. An agent immediately knows what it gets back and how it differs from a generic fetch.

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

Usage Guidelines3/5

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

There are no sibling tools, so the only routing guidance needed is parameter-level, and it does supply some: focus 'saves most of the page's tokens', links=false keeps text but drops addresses. It never states when this tool is inappropriate (e.g. non-HTML, JS-heavy pages, or pages behind auth), leaving usage only implied.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedread_page

TDQS

A4.3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. Its purpose is clearly distinct and unambiguous.

Naming Consistency5/5

The single tool name 'read_page' follows a predictable verb_noun pattern. With no other tools, there is no inconsistency.

Tool Count3/5

A single tool is on the thin side for a server; while the tool itself is feature-rich with multiple parameters, the surface could potentially offer additional related operations (e.g., batch reading, link extraction) to be more complete.

Completeness5/5

For its stated purpose of reading a web page as lean Markdown, the tool covers key parameters (url, focus, links, country) and returns the core output. No obvious gaps exist within this narrow domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables Claude and other LLMs to read and parse web content, with smart fallback strategies to bypass access restrictions (e.g., paywalls, Cloudflare) and output Markdown.
    5
    18 npm
    46
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to read web pages reliably, returning clean markdown content, hyperlinks, and metadata without navigation or ad noise.
    3
    6 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables reading web pages and PDFs as clean Markdown, extracting main content and letting agents query for relevant passages, outline sections, search in-page, and list links while respecting robots.txt and blocking private addresses.
    4
    MIT