Skip to main content
Glama

Convert document to Markdown

convert_document_to_markdown
Read-only

Turn any public document link into clean Markdown for reading, summarization, or indexing. Supports PDF, DOCX, PPTX, XLSX, CSV, EPUB, HTML, and more.

Instructions

Download documents from public URLs and convert them to clean Markdown: PDF, DOCX, PPTX, XLSX/XLS, CSV, EPUB, HTML, IPYNB, MSG, TXT, JSON, XML, RSS and ZIP archives of these. Returns the Markdown plus title, page and word counts, and optional heading-aware chunks for RAG / vector databases. Use it when you need to read, summarize, quote or index a document that is only reachable by link. Cost: $0.004 per document converted, billed to your Apify account; unsupported or failed files are free. Runs the Apify actor kantolabs/document-to-markdown with your APIFY_TOKEN; maxTotalChargeUsd caps the spend per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chunkSizeNoSplit each document into heading-aware chunks of about this many characters for embeddings. Default 0 (no chunking).
timeoutSecsNoGive up after this many seconds (max 300, Apify's limit for synchronous runs). Default 280. For big batches, split the input into several calls.
chunkOverlapNoCharacters repeated between consecutive chunks. Default 150.
documentUrlsYesDirect links to documents, e.g. ["https://arxiv.org/pdf/1706.03762"]. Links without a file extension work; the type is detected from the file itself.
maxFileSizeMbNoSkip (and do not charge) files larger than this. Default 50.
includeMarkdownNoReturn the full Markdown text. Default true; set false when only chunks are needed.
maxTotalChargeUsdNoHard spending cap for this call in USD, enforced by Apify: the run stops once it has charged this much. Default 1 (server setting KANTO_MAX_CHARGE_USD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: cost per document, unsupported/failed files being free, execution via the Apify actor with APIFY_TOKEN, and the maxTotalChargeUsd spending cap. These operational side effects are not inferable from readOnlyHint or openWorldHint.

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 dense but well organized: function and formats, return value, use case, then cost and execution details. Every sentence earns its place and there is no filler.

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 compensates by naming the return values: Markdown, title, page and word counts, and optional chunks. It also covers cost, failure behavior, and batch limits, giving the agent enough context to invoke the tool correctly.

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%, so the baseline is 3. The description mostly restates schema content such as chunking, file-type detection, and the spend cap rather than adding genuinely new parameter-level meaning.

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?

Clearly states the action: download documents from public URLs and convert them to clean Markdown, followed by a concrete list of supported formats. This separates it from sibling tools like download_images or extract_text_from_image by focusing on document-to-Markdown 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?

Explicitly says 'Use it when you need to read, summarize, quote or index a document that is only reachable by link.' It does not name explicit alternatives or when-not conditions, but none of the sibling tools competes directly with this conversion task.

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