Skip to main content
Glama
sandraschi

pdf-mcp

pdf_convert

Convert PDFs to Markdown, HTML, or images, and create PDFs from Markdown, HTML, or images. Transform documents between PDF and other formats with a single operation.

Instructions

Convert between PDF and other formats.

PDF to/from Markdown, HTML, and images.

Return Format

A dict with keys:

  • success: bool - whether the operation succeeded

  • message: str - human-readable summary

  • operation-specific keys:

    • to_markdown: {markdown, pages}

    • to_images: {images: [{page, path, width, height}]}

    • to_html: {html}

    • from_html/from_markdown/from_images: {path, pages} On failure: {success: False, error, error_type}.

Examples

await pdf_convert(operation="to_markdown", path="report.pdf") {"success": true, "markdown": "# Report...", "pages": 3, "message": "Converted report.pdf to markdown (3 pages)."}

await pdf_convert(operation="from_markdown", markdown="# Hello") {"success": true, "path": ".../output_from_markdown_....pdf", "pages": 1, "message": "Created PDF from markdown (1 pages), saved to output_from_markdown_....pdf."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoDPI for image output. Default 200.
fmtNoImage format (png, jpeg). Default png.png
htmlNoHTML content for from_html operation.
pathNoPath to the PDF file. Required for to_* operations.
pathsNoImage paths for from_images operation.
markdownNoMarkdown content for from_markdown operation.
operationYes
output_dirNoOutput directory for to_images operation.
output_pathNoOutput path. Auto-generated if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoHuman-readable summary
successNoWhether the operation succeeded

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description does carry some burden. It discloses the failure shape ({success: False, error, error_type}) and that outputs are written to disk with an auto-generated name, which is useful. It does not state file-write permissions, overwrite behavior, or where output lands when output_dir/output_path are omitted.

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 a one-line purpose followed by return-format and example sections that are skimmable and well-labeled. Slightly padded because an output schema already exists, making the return-format section partially redundant, but the worked examples genuinely aid correct invocation.

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 6-operation tool, the description names every operation, shows two worked calls, and explains both success and failure payloads. Since an output schema exists, return values need not be restated; the remaining gap is the absence of operation-to-parameter mapping (e.g. from_images needing paths).

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 description coverage is 89%, so the schema already documents path, paths, html, markdown, dpi, fmt, output_dir, and output_path. The description adds no per-parameter syntax or format detail beyond that, so the baseline 3 applies even though the call examples show realistic argument combinations.

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?

States a specific verb and resource ('Convert between PDF and other formats'), enumerates the target formats, and the operation enum makes the directionality explicit. It does not, however, distinguish itself from siblings such as pdf_export, pdf_extract, or pdf_do, which an agent must choose among from a 16-tool family.

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

Usage Guidelines2/5

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

There is no guidance on when to use pdf_convert versus pdf_export or pdf_extract, nor on prerequisites such as whether the PDF must already exist on disk. Usage is only implied through the operation enum, leaving the selection decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.