Skip to main content
Glama

PDF and document to Markdown

document_to_markdown
Read-onlyIdempotent

Convert one document at a public URL to Markdown from its text layer: PDF, Word DOCX, Excel XLSX/XLSM/XLSB/XLS, OpenDocument ODS/ODT, CSV, HTML, XML or Apple Numbers, up to 10 MB, Markdown up to 250,000 characters. Not OCR: scanned PDFs, images, PPTX and encrypted files are refused and not charged. Paid only: $0.004 USDC per file. Paid calls made without a payment return isError with the x402 v2 PaymentRequired object (amount in USDC atomic units, network, payTo, HTTP endpoint); retry with the signed PaymentPayload in params._meta["x402/payment"]. Invalid input and calls where every item fails are never charged. Fetches follow robots.txt, use the User-Agent AdamHaleTools/1.0 and refuse private or internal addresses.

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) URL of the document, e.g. "https://bitcoin.org/bitcoin.pdf".
filenameNoOptional file name, used as a format hint.
x402_paymentNoOptional, paid tier only: a signed x402 v2 PaymentPayload, base64 (the value an HTTP client sends as the PAYMENT-SIGNATURE header). Prefer params._meta["x402/payment"]. Never a private key or seed phrase.
include_metadataNofalse drops the PDF metadata block from the Markdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), yet the description adds substantial operational context beyond them: $0.004 USDC pricing, the paid-only model, the exact failure shape (isError plus x402 v2 PaymentRequired object with amount/network/payTo/endpoint), the retry channel, the no-charge guarantees, and fetch-policy details (robots.txt, User-Agent, SSRF refusal). This is exactly the kind of behavior an agent cannot infer from structured 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-loaded with the core verb and resource, then dense semicolon-separated clauses that each carry real information (limits, exclusions, pricing, payment protocol, fetch policy). Slightly overloaded for a single paragraph, but almost nothing is 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?

With no output schema, the description still conveys the return substance (Markdown output, 250k character ceiling, optional metadata block) and the failure modes, which is most of what an agent needs. It does not describe the success-response envelope itself, leaving a small gap for a tool whose result is delivered out-of-band.

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 earns an extra point by explaining the x402_payment round-trip (what a PaymentRequired response looks like and how to resubmit the payload via params._meta) — semantics the schema only gestures at. It is silent on include_metadata's effect, which keeps it from a 5.

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?

Specific verb (Convert) plus resource (document at a public URL) and an explicit scope: text-layer extraction into Markdown, with the full lattice of accepted formats enumerated. It stops short of naming sibling page_to_markdown, which is the natural alternative for plain HTML pages that also appear in this tool's format list, so the differentiation is inferential rather than explicit.

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 clear when-it-works conditions (formats, 10 MB, 250k chars) and strong when-not conditions: not OCR, scanned PDFs, images, PPTX and encrypted files are refused. It does not route the agent to a specific alternative such as page_to_markdown, so it lands one notch below fully explicit guidance.

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