Skip to main content
Glama

call402

PDF text to markdown

pdf_to_markdown
Read-only

Extracts the text of one digital PDF from a public URL and returns it as markdown (headings, lists, paragraphs) or plain text, with page count. Text PDFs only: no OCR, so scanned image PDFs come back empty and are not charged. Up to 25 MB and 200 pages; returned text is capped at 300,000 characters. Flat price per PDF converted. Price: $0.01 per successful call (x402 USDC on eip155:8453). Failed or empty calls are never charged.

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

Input Schema

NameRequiredDescriptionDefault
urlYesDirect public URL of one PDF file.
formatNoDefault markdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare it is a read-only, open-world, non-idempotent call; the description goes well beyond that by disclosing size/page limits (25 MB, 200 pages), an output cap (300,000 characters), and the failure semantics (empty results on scanned PDFs, no charge on failed or empty calls). It also states the cost model and payment rail, which an agent needs before invoking a paid tool.

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?

Four tight sentences: purpose first, then the OCR caveat, then hard limits, then pricing. Every clause carries operational information an agent or caller would otherwise have to discover by trial, and nothing is repeated from the schema or annotations.

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?

No output schema exists, yet the description tells the agent what comes back (markdown structure or plain text, plus page count) and what empty output means. Combined with limits, cost, and error behavior, an agent has everything needed to decide whether to call it and how to interpret results.

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 two parameters are already documented, and the description adds meaning on top: 'one digital PDF from a public URL' clarifies the URL must be direct and public, and the mention of markdown headings/lists/paragraphs explains what the format enum actually produces. It stops short of explaining edge cases such as redirects or non-PDF content types.

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 and resource ('Extracts the text of one digital PDF from a public URL') plus the exact return shapes (markdown with headings/lists/paragraphs, or plain text, plus page count). No sibling in the catalog converts PDFs, so the naming alone differentiates it, and the scope is bounded to a single URL.

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 a clear applicability boundary: 'Text PDFs only: no OCR, so scanned image PDFs come back empty.' That is an explicit when-not-to-use condition with the consequence spelled out. It does not name an alternative tool for scanned documents, which is the only missing piece.

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