Skip to main content
Glama

PDF and document to Markdown

document_to_markdown
Read-only

Convert PDF, Word, Excel, OpenDocument, CSV, HTML, or XML files from a public URL into clean Markdown that LLMs can read for analysis, extraction, or summarization.

Instructions

Convert a PDF, Word (.docx), Excel (.xlsx/.xls), OpenDocument, CSV, HTML or XML file at a URL into clean Markdown text an LLM can read. Up to 10 MB. Great for invoices, reports, papers, contracts and spreadsheets. Costs $0.004 per call.

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

Input Schema

NameRequiredDescriptionDefault
urlYesPublic URL of the document.
max_charsNoLongest Markdown to return. Default 50,000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds genuinely new operational facts beyond that: a 10 MB size cap, a $0.004 per-call cost, and that output is Markdown aimed at LLM consumption. It stops short of saying what happens on oversized or non-extractable documents, but with annotations already covering the safety profile this is a solid disclosure.

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?

Three short sentences, front-loaded with the verb and the format list, followed by limits, uses, and price. Every clause carries information (formats, size cap, compatibility, cost) with no filler.

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?

For a two-parameter conversion tool with no output schema, the description covers input formats, size limit, output format, typical use cases, and pricing. The remaining gap is edge-case behavior, such as truncation under max_chars or failure on scanned/unparsable documents.

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 coverage is 100%, with both url and max_chars fully documented including a default of 50,000 and a 1,000-200,000 range. The description adds nothing about truncation behavior when max_chars clips the document, so it neither compensates nor misleads; baseline 3 applies.

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 (Convert) plus an exhaustive list of input formats and the output format (clean Markdown text). The enumerated file types (PDF, .docx, .xlsx, OpenDocument, CSV, HTML, XML) implicitly separate it from a page-scraping sibling like page_to_markdown, so an agent can route on format alone.

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?

Names concrete use cases (invoices, reports, papers, contracts, spreadsheets) which gives implied guidance, but never states when to prefer this over page_to_markdown or what inputs are out of scope (scanned PDFs, files behind auth, non-public URLs). The agent must infer the boundary from the URL and format lists.

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