Skip to main content
Glama

Convert PDF or image to Markdown

convert_to_markdown

Convert PDF and image files to clean Markdown for RAG, LLM ingestion, and knowledge bases. Optionally include MinerU layout JSON (content list with blocks and bounding boxes).

Input: 1-5 public https file URLs, each ≤20 MiB. Supported: pdf, png, jpeg, webp, bmp, tiff. DOCX is not supported in this release. Private, local, and metadata hosts are rejected.

Processing is asynchronous upstream; this call polls until done or times out after about 75 seconds.

This Worker does not store uploaded files or results. Upstream MinerU task data is temporary (≤24h).

Billing: charged before the MinerU job is created (default 1 credit per tool call). No automatic refunds.

Powered by MinerU (opendatalab/MinerU). License: https://github.com/opendatalab/MinerU/blob/master/LICENSE.md

Input Schema

NameRequiredDescriptionDefault
filesYes1-5 public https file URLs.
include_layout_jsonNoWhen true, also return MinerU layout JSON (content_list) for each file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that processing is asynchronous upstream with internal polling and a ~75 second timeout, that the Worker stores nothing while upstream MinerU data lives ≤24h, and that billing is charged before job creation with no automatic refunds. These are exactly the operational facts an agent needs to set expectations and avoid surprise cost.

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-loads the purpose, then uses compact labeled blocks (Input, Processing, Storage, Billing) so the agent can scan constraints quickly. The trailing 'Powered by MinerU' attribution and license URL are slightly beyond call-relevant content but are short and not disruptive.

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?

Covers input shape, async/timeout behavior, data retention, and billing — a lot for a two-parameter tool with no output schema. The remaining gap is return shape: it never says whether multiple files produce per-file or concatenated Markdown, nor what is returned when the ~75s poll times out mid-job.

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 baseline is 3, but the description adds real constraints absent from the schema: the 20 MiB per-file cap, the enumerated supported formats (pdf, png, jpeg, webp, bmp, tiff), and the rejection of private/local/metadata hosts. The layout-JSON flag is explained in the schema itself and only lightly echoed here.

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?

Names a specific verb and resource ('Convert PDF and image files to clean Markdown') and states the intended downstream use (RAG, LLM ingestion, knowledge bases). It does not explicitly differentiate itself from siblings like ocr_image or extract_tables, so an agent must infer that this is the full-document Markdown path rather than a text- or table-only extraction.

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 concrete selection context: 1-5 public https URLs, ≤20 MiB, supported formats listed, and an explicit exclusion ('DOCX is not supported in this release', 'Private, local, and metadata hosts are rejected'). What is missing is sibling routing — nothing says when to prefer ocr_image (single image text) or extract_tables (table-only) over this tool.

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.