Skip to main content
Glama

apex-dev

Pdf to markdown

pdf_to_markdown
Read-onlyIdempotent

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. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, and the description adds material facts they don't carry: per-call cost of $0.002, accepted payment rails (x402 USDC on Arc/Base/Solana, XNT on X1), and the two-step unpaid-then-paid handshake. Cost and payment gating are exactly the behavioral context an agent needs before invoking.

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?

Two sentences, both front-loaded: capability and output contract first, commercial/payment mechanics second. Every clause carries information — no filler, no restatement of the title.

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 what comes back (headings, bullets, page markers, metadata, word count). Combined with full schema coverage and rich annotations, an agent has everything needed to call this correctly, including the payment prerequisite.

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%, so url, payment, max_pages, and pdfBase64 are already documented. The description adds the payment lifecycle (bare call returns terms, second call settles) but says nothing about max_pages or the 6 MB base64 limit beyond what the schema states, so 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 precise verb+resource pair (convert PDF URL or base64 PDF into Markdown) and enumerates the output shape: headings, bullets, page markers, title/author metadata, word count. The PDF input resource clearly separates it from siblings like markdown_to_pdf, html_to_pdf, and html_to_markdown.

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 explicit operational sequencing: 'Call once without `payment` for terms, then call again with `payment`' — an agent knows exactly how to start. It does not explicitly address when to prefer this over html_to_markdown or page_markdown, so it stops short of full alternative routing.

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