Docmint

v0.1.1
io.github.Noju-io/docmint Checked 9 hours ago Published 21 days ago

PDF and image tools for AI agents: compress, merge, split, OCR, sign.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

merge_pdf Merge PDF

Combine several PDFs (and JPG/PNG/WebP images, one page each) into one PDF, in the order given.

ParameterTypeDescription
inputs *array
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

split_pdf Split PDF

Extract pages into one PDF (mode=range), split each comma-separated range into its own PDF (separate), cut every N pages (every), or save every page as a file (all).

ParameterTypeDescription
input *objectA file given as a local path or as base64.
everyinteger
modestring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
rangesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

rotate_pdf Rotate PDF

Rotate all pages, or only the given pages, by 90, 180 or 270 degrees clockwise.

ParameterTypeDescription
degrees *number
input *objectA file given as a local path or as base64.
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

delete_pages Delete pages

Remove the given pages from a PDF.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
pages *stringPages to delete, e.g. "2, 5-7".
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

organize_pages Organize pages

Rebuild a PDF from an explicit page order (1-based page numbers; repeat a number to duplicate, omit to drop, 0 for a blank page), with optional per-position rotation.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
order *array
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
rotationsarray

nup_pdf N-up / booklet

Place 2, 4, 6 or 9 pages per sheet, or impose a booklet for duplex printing and folding.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
bordersboolean
gap_mmnumber
layoutstring
margin_mmnumber
orientationstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
sheetstring

compress_pdf Compress PDF

Reduce PDF size. Levels: lossless (Rewrites the file structure. Text, links and quality untouched. Smaller savings.); balanced (Turns pages into 150 DPI images. Great on screen, OK in print. Text can't be selected afterwards.); strong (Turns pages into 110 DPI images. Smallest readable size. Text can't be selected afterwards.); extreme (Turns pages into 80 DPI images. For previews only. Text can't be selected afterwards.). Levels other than lossless rasterise pages, so text stops being selectable. Never returns a larger file.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
levelstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

watermark_pdf Watermark PDF

Stamp text (or a PNG/JPG image) on every page or on a page range.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
behind_contentboolean
colorstring
font_sizenumber
imageOptional image watermark; used instead of text when given.
image_widthnumberImage width as a fraction of page width.
opacitynumber
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
positionstring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
rotationnumber
textstring
tileboolean

add_page_numbers Add page numbers

Stamp page numbers in the chosen format and position.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
font_sizenumber
formatstring
margin_mmnumber
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
positionstring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
start_numberinteger
start_pageinteger

crop_pdf Crop PDF

Crop pages by margins given as percentages of the page (0-45), or auto-trim white margins based on the first page's content.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
auto_trimboolean
bottomnumber
leftnumber
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
rightnumber
topnumber

resize_pages Resize pages

Scale every page to a standard size (A4, Letter, ...) or a custom size in millimetres.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
height_mmnumber
modestring
orientationstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
sizestring
width_mmnumber

grayscale_pdf Grayscale PDF

Convert pages to grayscale or pure black and white (pages are rasterised; text stops being selectable).

ParameterTypeDescription
input *objectA file given as a local path or as base64.
dpiinteger
modestring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

pdf_to_images PDF to images

Render pages as JPG, PNG or WebP images at the given resolution.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
dpiinteger
formatstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pagesstringPage range such as "1-3, 5, 8-12" (1-based). Empty = all pages.
qualitynumber
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

images_to_pdf Images to PDF

Turn JPG, PNG or WebP images into a PDF, one image per page.

ParameterTypeDescription
inputs *array
margin_mmnumber
orientationstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
page_sizestring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

text_to_pdf Text to PDF

Typeset plain text or Markdown (headings, lists, bold, italic, code) as a PDF.

ParameterTypeDescription
text *string
fontstring
font_sizenumber
margin_mmnumber
markdownboolean
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
page_sizestring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
titlestring

process_image Compress, convert or resize images

Re-encode images: change format (jpeg/png/webp), quality, and resize by max dimensions, exact pixels or percent. EXIF data is dropped.

ParameterTypeDescription
inputs *array
formatstring
heightinteger
max_heightinteger
max_widthinteger
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
percentnumber
qualitynumber
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
widthinteger

protect_pdf Protect PDF

Encrypt a PDF with AES-256 (or AES-128) and set permissions. The owner password defaults to the user password.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
algorithmstring
allow_annotatingboolean
allow_copyingboolean
allow_form_fillingboolean
allow_modifyingboolean
allow_printingboolean
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
owner_passwordstring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
user_passwordstring

unlock_pdf Unlock PDF

Remove the password from a PDF you have the password for.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
passwordstring
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

edit_metadata Edit or strip metadata

Read, change or remove document properties (title, author, subject, keywords, creator, producer, dates). With strip=true everything is removed, including XMP.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
authorstring
creatorstring
keywordsstringComma-separated.
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
producerstring
read_onlybooleanOnly report the current metadata; write nothing.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
stripboolean
subjectstring
titlestring

flatten_pdf Flatten PDF

Flatten form fields and annotations into static content (mode=forms, keeps text), or rasterise every page (mode=rasterize, nothing stays editable).

ParameterTypeDescription
input *objectA file given as a local path or as base64.
dpiinteger
modestring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

sign_pdf Sign PDF

Place a signature image (PNG with transparency works best) on a page. Position and width are fractions of the page (0-1) measured from the top-left corner; height follows the image's aspect ratio.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
signature *
all_pagesboolean
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
pageinteger
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
widthnumber
xnumber
ynumber

extract_text Extract text

Extract the text of a PDF (one that has a text layer; use ocr_pdf for scans). Returns the text and optionally writes a .txt/.md file.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
formatstring
keep_layoutboolean
max_charsinteger
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).
write_fileboolean

inspect_pdf Inspect PDF

Report page count and sizes, metadata, encryption and permissions, fonts and whether they are embedded, form fields, bookmarks, attachments and word count.

ParameterTypeDescription
input *objectA file given as a local path or as base64.

compare_pdfs Compare two PDFs

Line-by-line text diff of two PDFs. Returns counts and the changed lines (+ added, - removed).

ParameterTypeDescription
original *objectA file given as a local path or as base64.
revised *
ignore_whitespaceboolean
max_linesinteger

ocr_pdf OCR a scanned PDF or image

Recognise text in a scanned PDF or an image. Produces a searchable PDF (original pages plus an invisible text layer) and/or a .txt file. Languages: eng, spa, fra, deu, ita, por, nld, pol, tur, rus, ara, hin, chi_sim, chi_tra, jpn, kor. The first run downloads the language model.

ParameterTypeDescription
input *objectA file given as a local path or as base64.
dpiinteger
languagestring
outputstring
output_dirstringDirectory to write results into. Defaults to the input file's folder.
output_pathstringWrite the (single) result to exactly this path.
return_base64booleanAlso return the result bytes inline as base64 (default: only when no file could be written).

docmint_account Docmint account & allowance

Shows the current plan and how many runs are left today for this machine or API key, and how to sign in or upgrade.

connect_docmint_account Connect a Docmint account

Links this MCP server to the user's Docmint account so runs use their plan (10 a day free, unlimited on Pro). Returns a link the user opens to approve; the connection completes in the background within 10 minutes. Show the link to the user.

list_docmint_tools List Docmint tools

Describe every Docmint tool: the MCP tool name to call, its website name, category, what it does and accepted inputs. Useful before choosing which tool to call.