Skip to main content
Glama
AssemblyJustin

Assembly MCP

convert_pdftomd

Convert PDF files to Markdown with automatic heading detection, table extraction, and optional watermark removal.

Instructions

Convert a PDF file to Markdown.

Uses PyMuPDF with font-size heading detection, running header/footer
removal, table extraction, and optional watermark stripping — the Assembly
PDF→MD pipeline. Returns the Markdown text; when `output_path` is given it
also writes a `.md` file there.

Args:
    pdf_path: Path to the source `.pdf` file.
    output_path: Optional path to also write the Markdown to (`.md`).
    strip_watermarks: Remove Standards-NZ / IHS style watermark lines and
        light-grey overlay text.
    front_matter: Prepend YAML front-matter linking back to the source PDF.

Returns:
    The converted Markdown as a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYes
output_pathNo
front_matterNo
strip_watermarksNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses the conversion process (PyMuPDF, heading detection, header/footer removal, table extraction), optional watermark stripping, side effects (writing a file when output_path is given), and the return value. This goes well beyond basic expectations.

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?

The description is well-structured with a clear summary, Args section, and Returns section. It is appropriately sized for a tool with four parameters, and every sentence adds value without redundancy.

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?

The description is complete: it covers the conversion process, all parameters, side effects, and return value. The presence of an output schema doesn't override the need for context, and the description provides rich behavioral context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain each parameter. It does so clearly: pdf_path as source .pdf, output_path as optional write target, strip_watermarks for specific watermark removal, and front_matter for YAML prepending. This adds meaning beyond the raw schema.

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 tool's function: 'Convert a PDF file to Markdown.' It identifies the specific resource (PDF), the output format (Markdown), and the direction of conversion, which distinguishes it from the sibling tool convert_mdtopdf.

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

Usage Guidelines3/5

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

The description implies usage by stating the conversion direction and pipeline details, but it does not explicitly mention when to use this tool instead of the sibling convert_mdtopdf, nor does it provide any exclusions or alternative scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AssemblyJustin/assembly-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server