TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pymupdf/pymupdf4llm-mcp/llms.txt
Use this file to discover all available pages before exploring further.
convert_pdf_to_markdown tool is the single tool exposed by the pymupdf4llm-mcp server. It converts a PDF file to Markdown using pymupdf4llm, extracting text, structure, and optionally images from the document. Depending on whether a save_path is provided, the tool either returns the Markdown content inline or writes it to disk and returns the file path.
Tool name
Tool description
Converts a PDF file to markdown format via pymupdf4llm. See pymupdf.readthedocs.io/en/latest/pymupdf4llm for more. Thefile_path,image_path, andsave_pathparameters should be the absolute path to the PDF file, not a relative path. This tool will also convert the PDF to images and save them in theimage_pathdirectory. For larger PDF files, usesave_pathto save the markdown file then read it partially.
Parameters
Absolute path to the PDF file to convert. The path must be absolute — relative paths are not accepted.Example:
/home/user/documents/report.pdfAbsolute path to the directory where extracted images will be saved. If not provided, images are saved in the same directory as the PDF file.Default: Same directory as the input PDF file.Example:
/home/user/documents/images/Absolute path for the output Markdown file. When provided, the tool writes the converted Markdown to disk and returns the file path instead of the Markdown string. Use this for large PDFs that exceed the 10,000-character inline limit.Example:
/home/user/documents/report.mdUsage examples
When no
save_path is provided, the tool returns the Markdown content inline. If the converted content exceeds 10,000 characters, it is truncated at that limit and a ... (truncated) marker is appended. For documents where truncation is a concern, always supply a save_path so the full content is written to disk and can be read in parts.Error handling
The tool returns a JSON object with"success": false whenever a recoverable error occurs. No exceptions are raised to the MCP client.
File not found — returned when file_path does not exist on disk: