Skip to main content
Glama

PDF to Markdown

pdf_to_markdown

Extract the text of a PDF and convert it to clean markdown. Detects headings by font size and preserves lists and paragraphs. Input: a text-based PDF via file_url or file_base64. For scanned PDFs use ocr_image on page images instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlNoPublic http(s) URL of the file
file_base64NoBase64-encoded file contents (data-URI prefix allowed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden. It discloses key behaviors: text extraction, markdown conversion, heading detection, and list/paragraph preservation. However, it doesn't mention return format, error handling, or limitations on PDF size/complexity, leaving some gaps.

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, front-loaded with purpose, then input constraints, then alternative. Zero wasted words, every clause adds value.

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 simple two-parameter tool with no output schema and no annotations, the description covers the main purpose, input format, behavioral features, and an important exception. It lacks explicit return value details, but given the tool's simplicity, it is fairly complete.

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 good descriptions for both file_url and file_base64. The description adds the context that the PDF must be text-based, but this applies to the overall input rather than individual parameters. It doesn't add further semantic detail beyond the schema, so a baseline 3 is appropriate.

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 clearly states the verb ('Extract the text of a PDF and convert it to clean markdown'), specifies the resource (PDF), and differentiates from siblings by mentioning heading detection and list/paragraph preservation. It also explicitly directs scanned PDFs to ocr_image, setting it apart from that sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit input constraints ('text-based PDF') and an explicit alternative for scanned PDFs ('use ocr_image on page images instead'). This provides clear when-to-use and when-not-to-use guidance, including a named alternative.

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