docraptor-mcp

v1.0.0
io.github.mrfentmen/docraptor-mcp Checked 21 hours ago Published 1 month ago

DocRaptor: render HTML to PDF and XLSX documents through the DocRaptor API.

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

docraptor_create_pdf

Generate ONE PDF from HTML (document_content) or a public URL (document_url). Defaults to test=true (free, watermarked); set test=false only when you mean to spend credits.

ParameterTypeDescription
name *stringdocument name; also becomes the default file name
base_urlstringbase URL for relative links in the HTML
document_contentstringthe HTML/CSV source of the document
document_urlstringa public URL to render instead of inline content
http_timeoutintegerseconds
insecurebooleanallow self-signed SSL certificates when fetching assets
javascriptbooleanrun JavaScript while rendering (PDF only)
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked
type

docraptor_create_xlsx

Generate ONE XLSX spreadsheet from HTML/CSV-ish content or a URL. Test mode by default.

ParameterTypeDescription
name *stringdocument name; also becomes the default file name
base_urlstringbase URL for relative links in the HTML
document_contentstringthe HTML/CSV source of the document
document_urlstringa public URL to render instead of inline content
http_timeoutintegerseconds
insecurebooleanallow self-signed SSL certificates when fetching assets
javascriptbooleanrun JavaScript while rendering (PDF only)
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked
type

docraptor_create_xlsx_from_rows

Build a table from headers + rows locally, then render it as an XLSX. No HTML authoring needed.

ParameterTypeDescription
name *stringdocument name; also becomes the default file name
rows *arraydata rows
headersarrayoptional header row
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked

docraptor_create_report

Render a styled PDF report from a title, an optional meta line, and a table (headers + rows). The HTML is composed locally, the PDF by DocRaptor. Test mode by default.

ParameterTypeDescription
rows *array
title *string
headersarray
metastringone-line subtitle/context
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked

docraptor_create_async

Queue a document on the async API instead of waiting for bytes: returns a download_url and status_url. Same arguments as create_pdf/create_xlsx; pick type explicitly.

ParameterTypeDescription
name *stringdocument name; also becomes the default file name
type *
base_urlstringbase URL for relative links in the HTML
document_contentstringthe HTML/CSV source of the document
document_urlstringa public URL to render instead of inline content
http_timeoutintegerseconds
insecurebooleanallow self-signed SSL certificates when fetching assets
javascriptbooleanrun JavaScript while rendering (PDF only)
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked

docraptor_async_status

Read the status_url returned by an async create (JSON with the job state).

ParameterTypeDescription
status_url *stringstatus_url from the async create response

docraptor_async_fetch

Fetch the document bytes from a finished async job (its presigned download_url); save or inline.

ParameterTypeDescription
download_url *stringdownload_url from the async create/status response
save_pathstringpath to write the document to

docraptor_create_production

A real (test=false) render that spends credits. Refuses to run unless confirm=true is passed, so a caller cannot bill you by accident.

ParameterTypeDescription
confirm *booleanmust be true
name *stringdocument name; also becomes the default file name
type *
base_urlstringbase URL for relative links in the HTML
document_contentstringthe HTML/CSV source of the document
document_urlstringa public URL to render instead of inline content
http_timeoutintegerseconds
insecurebooleanallow self-signed SSL certificates when fetching assets
javascriptbooleanrun JavaScript while rendering (PDF only)
save_pathstringpath to write the document to
testbooleantest documents are free and watermarked

docraptor_test_ping

Render a tiny free test PDF - a health check that the API key and account work.

docraptor_validate_html

Local sanity checks on HTML before spending a render: required elements, tag balance for common block tags, insecure http:// asset URLs. No API call.

ParameterTypeDescription
html *string

docraptor_check_source_url

GET a document_url once to check the renderer will be able to reach it (status + content type). Cheaper than a failed render.

ParameterTypeDescription
url *stringthe URL you plan to pass as document_url