Skip to main content
Glama

Pdf to markdown

pdf_to_markdown
Read-onlyIdempotent

PDF to Markdown. Convert any public PDF URL or base64 PDF into clean LLM-ready Markdown with headings, bullet formatting, page markers, title/author metadata, and word count. $0.002 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for terms, then call again with payment.

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

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of a PDF document (or pass pdfBase64).
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).
max_pagesNoOptional max pages to extract (1-150).
pdfBase64NoOptional base64-encoded PDF file (up to 6 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so the bar is lower, but the description adds genuinely new behavior: a $0.002 per-call cost, the accepted payment rails, and a required two-call negotiation before a successful conversion. What is returned is also characterized (page markers, metadata, word count). It omits failure modes (e.g. what an unpaid call returns) and any default for max_pages.

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 sentences, front-loaded with purpose and output shape, then cost and the call sequence. No sentence is wasted and nothing repeats the schema verbatim.

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 4-parameter, no-required-param tool with full schema coverage and no output schema, this covers purpose, output form, cost, and the payment protocol. The only gap is the unpaid-call response and default page behavior, which an agent could infer from the stated terms flow.

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 real meaning to the `payment` parameter by explaining it must be obtained from a prior unpaid call and is a signed x402 payload. The url vs pdfBase64 choice and page/size limits are left to the schema, which already documents them well.

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?

The description names a specific verb and resource ('Convert any public PDF URL or base64 PDF') and enumerates the exact output shape ('headings, bullet formatting, page markers, title/author metadata, and word count'). The input resource (PDF) alone distinguishes it from siblings such as html_to_markdown or markdown_to_pdf, so an agent can select it without opening the schema.

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?

It gives explicit procedural guidance for the payment handshake: 'Call once without `payment` for terms, then call again with `payment`.' That is a real when/how-to-use instruction an agent would otherwise get wrong. It stops short of naming alternatives or exclusions (e.g. when to prefer html_to_markdown), keeping it at a 4.

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