PDF.co MCP by usefulapi

v1.1.0
io.usefulapi/pdf-co Checked 8 hours ago Published 7 days ago

Read and parse PDFs; create merged, split, converted, protected or edited PDF copies in PDF.co.

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

pdfco_get_credit_balance Get credit balance

Get the remaining PDF.co credits and plan info for the account. Every processing call uses credits, so check this first when a call fails for lack of credits. PDF.co API: GET /v1/account/credit/balance.

pdfco_get_pdf_info Get PDF info

Read a PDF's metadata: page count, page sizes, encryption and form flags. Reads the file only; it does not change it. PDF.co API: POST /v1/pdf/info.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
passwordstringPassword of the input PDF, if it is protected.

pdfco_find_text Find text in PDF

Search a PDF for a text string or regular expression and return where it matches (page and position). Reads the file only. PDF.co API: POST /v1/pdf/find.

ParameterTypeDescription
searchstring *stringThe text to find, or a regular expression when regexsearch is true.
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
casesensitivebooleanMatch case (default true).
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.
regexsearchbooleanTreat searchstring as a regular expression.

pdfco_list_parser_templates List document parser templates

List the saved document parser templates on the account. Use a template id with pdfco_parse_document. PDF.co API: GET /v1/pdf/documentparser/templates.

pdfco_parse_document Parse document with template

Extract fields from a document (for example an invoice) with a saved parser template and return them as JSON, YAML, XML or CSV. Reads the file only. Find template ids with pdfco_list_parser_templates. PDF.co API: POST /v1/pdf/documentparser.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
outputformatstringOutput format (default JSON).
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.
templateidintegerParser template id from pdfco_list_parser_templates.

pdfco_pdf_to_text Extract text from PDF

Extract the text of a PDF into a text file (OCR runs on scanned pages). Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Reads the file only. PDF.co API: POST /v1/pdf/convert/to/text.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
langstringOCR language for scanned pages, for example eng or eng+deu.
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.

pdfco_pdf_to_csv Convert PDF tables to CSV

Convert the tables in a PDF to a CSV file. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Reads the file only. PDF.co API: POST /v1/pdf/convert/to/csv.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.

pdfco_merge_pdfs Merge PDFs

Merge 2 to 20 public PDF URLs into one PDF, in the order given. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/merge.

ParameterTypeDescription
urls *arrayThe PDF URLs to merge, in order.
namestringFile name for the output file on PDF.co storage.

pdfco_split_pdf Split PDF

Split a PDF so that only the given pages stay in the output. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/split.

ParameterTypeDescription
pages *string1-based pages to keep, comma-separated: 1-3,5.
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
namestringFile name for the output file on PDF.co storage.
passwordstringPassword of the input PDF, if it is protected.

pdfco_compress_pdf Compress PDF

Make a smaller copy of a PDF. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v2/pdf/compress.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
compressionLevelstringCompression preset (default medium).
namestringFile name for the output file on PDF.co storage.
passwordstringPassword of the input PDF, if it is protected.

pdfco_add_pdf_password Add password to PDF

Make an encrypted copy of a PDF with an owner password and a user (open) password. The source file is not changed. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/security/add.

ParameterTypeDescription
ownerpassword *stringOwner password: controls editing and permissions.
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
userpassword *stringUser password: needed to open the output PDF.
namestringFile name for the output file on PDF.co storage.

pdfco_remove_pdf_password Remove password from PDF

Make an unprotected copy of a password-protected PDF. The source file is not changed. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/security/remove.

ParameterTypeDescription
password *stringThe password that opens the input PDF.
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
namestringFile name for the output file on PDF.co storage.

pdfco_url_to_pdf Web page to PDF

Render a public web page to a PDF. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/convert/from/url.

ParameterTypeDescription
url *stringPublic web page URL to render.
namestringFile name for the output file on PDF.co storage.

pdfco_markdown_to_pdf Markdown to PDF

Render Markdown text to a PDF. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/convert/from/md.

ParameterTypeDescription
markdown *stringThe Markdown text to render (UTF-8).
namestringFile name for the output file on PDF.co storage.

pdfco_excel_to_pdf Excel to PDF

Convert one worksheet of an Excel file (XLS or XLSX) to a PDF. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/xls/convert/to/pdf.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
namestringFile name for the output file on PDF.co storage.
worksheetindexinteger0-based worksheet index (default 0).

pdfco_make_searchable Make PDF searchable (OCR)

Add a searchable text layer (OCR) to a scanned PDF. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/makesearchable.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
langstringOCR language, for example eng or eng+deu.
namestringFile name for the output file on PDF.co storage.
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.

pdfco_delete_pages Delete PDF pages

Make a copy of a PDF without the given pages. The source file is not changed. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/edit/delete-pages.

ParameterTypeDescription
pages *string1-based pages to delete, comma-separated: 2,4-5.
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
namestringFile name for the output file on PDF.co storage.
passwordstringPassword of the input PDF, if it is protected.

pdfco_rotate_pages Rotate PDF pages

Make a copy of a PDF with the given pages rotated. The source file is not changed. Returns a `url` to the output file on PDF.co temporary storage (deleted after about 60 minutes). Uses credits. PDF.co API: POST /v1/pdf/edit/rotate.

ParameterTypeDescription
url *stringPublic http(s) URL of the input PDF (PDF.co downloads it; it must not need a login).
anglestringClockwise rotation in degrees (default 90).
namestringFile name for the output file on PDF.co storage.
pagesstring0-based page list, comma-separated: 0,2-4 (!0 is the last page). Omit for all pages.
passwordstringPassword of the input PDF, if it is protected.