Skip to main content
Glama

Web page to clean Markdown

web_markdown
Read-only

Markdown of a live web page for LLM context: final URL after up to 5 validated redirects, HTTP status, content type, title, meta description, lang, Markdown (main content by default: /, without scripts, navigation, asides, footers), word count, token estimate, link count and truncation flag. PDF, DOCX, XLSX, OpenDocument, CSV and XML URLs are converted too; plain text is passed through. Conversion: Cloudflare Workers AI toMarkdown. DNS via Cloudflare DoH. Price: $0.003 per successful call, paid in USDC with x402 v2; failed calls and calls that match nothing are not charged.

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": {
      "url": "<url>"
    },
    "name": "web_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttp or https URL of the page (a bare domain is fetched as https://). Default ports only; credentials, IP addresses, localhost and private or single-label names are rejected.
main_onlyNotrue (default) converts only the main content (<main>, else <article>, else <body>) with scripts, styles, navigation, asides, footers and similar blocks removed; false converts the whole page (with front matter and any JSON-LD).
max_charsNoMaximum characters of Markdown returned, 1000 to 100000. Default 20000. Longer output is cut at a line boundary and flagged truncated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them, disclosing redirect handling (up to 5 validated redirects), the returned fields (final URL, status, content type, title, meta, lang, word count, token estimate, link count, truncation flag), the truncation mechanism, the conversion backend, and DNS resolution. Most importantly it discloses pricing behavior that directly affects invocation decisions: $0.003 per successful call paid in USDC via x402 v2, with failed or empty-matching calls not charged.

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-loads the core output contract and keeps everything to a small number of dense sentences with essentially no filler; every clause (redirect limit, defaults, format coverage, price) carries information an agent needs. It is light on structure, though — the returned-field list, format handling and billing are run together in one stream rather than separated, which slightly slows parsing.

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?

With no output schema, the description fully compensates by enumerating the response fields an agent will receive, including the truncation flag that affects how results should be consumed. For a paid, open-world fetch tool it also covers redirect limits, format coverage and billing rules, leaving no material gap an agent would need before calling it.

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 description coverage is 100% for all three parameters, including url restrictions, the main_only default and what it strips, and max_chars bounds with truncation behavior, so the schema does the heavy lifting. The description restates the default main-content extraction (main/article, no scripts/nav/asides/footers) already covered by the main_only schema text and adds no new parameter-level detail such as URL normalization rules beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: converts a live web page into Markdown for LLM context, and distinguishes itself from a generic fetcher by stating the extraction target (main content by default, scripts/nav stripped). It also carves out non-HTML formats (PDF, DOCX, XLSX, CSV, XML converted; plain text passed through), which indirectly differentiates it from doc_markdown, but never names or contrasts a sibling explicitly.

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?

Usage is implied by 'for LLM context' and by the format coverage list, which tells an agent this handles URL-addressable documents and text as well as HTML. There is no explicit when-not-to-use guidance, no pointer to web_check or web_headers for metadata-only needs, and no warning that a pay-per-call charge applies before invoking — the agent must infer these.

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