Skip to main content
Glama
Internamaro Apify Data MCP

Internamaro Apify Data MCP

HTML to Markdown

html_to_markdown
Read-only

Converts web pages, raw HTML strings, or Apify dataset HTML into clean Markdown for LLMs and RAG, extracting main content and preserving tables and absolute links.

Instructions

Returns one item per input page or HTML string with URL, title, markdown, wordCount, charCount, truncated, status and error. Converts web pages (fetched by URL, no crawling), raw HTML strings or HTML stored in an Apify dataset into clean Markdown for LLMs and RAG, with main-content extraction, GitHub-flavored tables and absolute links. Give at least one of: urls or htmlStrings or datasetId. Runs the Apify Actor ucchiii/html-to-markdown on YOUR Apify account (APIFY_TOKEN); you pay that Actor's pay-per-event price, see https://apify.com/ucchiii/html-to-markdown.

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": "html_to_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsNoFull page URLs starting with http:// or https://. Only these pages are fetched (no crawling); pages over 5 MB and internal or private addresses are refused. Up to 10,000 inputs per run in total.
baseUrlNoOptional http(s) URL used to turn relative links and images in the raw HTML strings into absolute ones, and written to the front matter.
maxCharsNoCut each Markdown document at this length, at a paragraph boundary where possible (the row gets truncated: true). 0 means no limit.
datasetIdNoOptional. Dataset ID (a finished run's 'defaultDatasetId', e.g. 'WkzbQMuFYuamGv3YF') whose items hold HTML in the field below. If an item has a 'url' it is used as the base URL for links.
htmlFieldNoName of the field in each dataset item that holds the HTML string.html
imageModeNoDrop images (best for LLM text) or keep them as Markdown image links. Inline data: images are always dropped.drop
userAgentNoOptional custom User-Agent header for page requests. Default identifies this Actor.
keepTablesNoConvert HTML tables to GitHub-flavored Markdown tables. If off, each table row becomes a plain line of text.
concurrencyNoHow many pages are fetched in parallel. Allowed range 1 to 10 (default 5). At most 2 connections per host are used at a time, with at least 0.2 s between requests to the same host.
frontMatterNoStart each document with a YAML front-matter block holding the title and the URL.
htmlStringsNoRaw HTML documents to convert, one string per document (up to 5 MB each). Use this when you already have the HTML, for example from your own scraper.
mainContentNoRemove nav, header, footer, aside and similar page chrome, and keep only the main or article element when the page has one. Scripts and styles are always removed.
timeoutSecsNoTimeout for each page request, in seconds. Allowed range 1 to 120 (default 20).
absoluteLinksNoResolve relative links and image URLs against the page URL (or the base URL for raw HTML). javascript: links are always removed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds materially beyond that by disclosing that the tool runs a third-party Actor on the caller's Apify account, requires APIFY_TOKEN, and incurs pay-per-event charges. It also notes no-crawling behavior and main-content/tables/absolute-link processing defaults, though it says nothing about rate limiting or failure handling beyond the 'status and error' fields.

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 return shape before the purpose, which is the right order given there is no output schema, and uses three dense sentences with no filler. The first sentence is a long comma-separated field list and could be tightened, but no sentence is expendable.

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 14-parameter tool with no output schema, the description covers the return fields, the valid input combinations, the conversion semantics and the cost/auth model — everything an agent needs before calling. Full schema description coverage handles the per-parameter detail, so nothing essential is missing.

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 value by surfacing the at-least-one-of constraint across urls/htmlStrings/datasetId and by summarizing the default-on behaviors (main-content extraction, GitHub-flavored tables, absolute links) that correspond to the mainContent, keepTables and absoluteLinks switches. It does not add syntax or format detail beyond the schema, so it stays below a 5.

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 ('converts ... into clean Markdown') and enumerates the three input modes (URL, raw HTML string, Apify dataset), which cleanly separates it from the format-conversion siblings like excel_to_json. The scope constraint 'fetched by URL, no crawling' further pins down what the tool does.

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?

Gives an explicit precondition — 'Give at least one of: urls or htmlStrings or datasetId' — which tells the agent exactly what a valid call requires, and the input modes imply the selection criteria. It stops short of naming a sibling alternative or stating when NOT to use it, so it is clear but not complete guidance.

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