docraptor-mcp
v1.0.0DocRaptor: 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | document name; also becomes the default file name |
base_url | string | base URL for relative links in the HTML |
document_content | string | the HTML/CSV source of the document |
document_url | string | a public URL to render instead of inline content |
http_timeout | integer | seconds |
insecure | boolean | allow self-signed SSL certificates when fetching assets |
javascript | boolean | run JavaScript while rendering (PDF only) |
save_path | string | path to write the document to |
test | boolean | test 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | document name; also becomes the default file name |
base_url | string | base URL for relative links in the HTML |
document_content | string | the HTML/CSV source of the document |
document_url | string | a public URL to render instead of inline content |
http_timeout | integer | seconds |
insecure | boolean | allow self-signed SSL certificates when fetching assets |
javascript | boolean | run JavaScript while rendering (PDF only) |
save_path | string | path to write the document to |
test | boolean | test 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | document name; also becomes the default file name |
rows * | array | data rows |
headers | array | optional header row |
save_path | string | path to write the document to |
test | boolean | test 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.
| Parameter | Type | Description |
|---|---|---|
rows * | array | |
title * | string | |
headers | array | |
meta | string | one-line subtitle/context |
save_path | string | path to write the document to |
test | boolean | test 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | document name; also becomes the default file name |
type * | ||
base_url | string | base URL for relative links in the HTML |
document_content | string | the HTML/CSV source of the document |
document_url | string | a public URL to render instead of inline content |
http_timeout | integer | seconds |
insecure | boolean | allow self-signed SSL certificates when fetching assets |
javascript | boolean | run JavaScript while rendering (PDF only) |
save_path | string | path to write the document to |
test | boolean | test documents are free and watermarked |
docraptor_async_status
Read the status_url returned by an async create (JSON with the job state).
| Parameter | Type | Description |
|---|---|---|
status_url * | string | status_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.
| Parameter | Type | Description |
|---|---|---|
download_url * | string | download_url from the async create/status response |
save_path | string | path 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.
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | must be true |
name * | string | document name; also becomes the default file name |
type * | ||
base_url | string | base URL for relative links in the HTML |
document_content | string | the HTML/CSV source of the document |
document_url | string | a public URL to render instead of inline content |
http_timeout | integer | seconds |
insecure | boolean | allow self-signed SSL certificates when fetching assets |
javascript | boolean | run JavaScript while rendering (PDF only) |
save_path | string | path to write the document to |
test | boolean | test 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.
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
url * | string | the URL you plan to pass as document_url |