PDFShift MCP by usefulapi
v1.1.0Convert HTML and URLs to PDF or images, manage HTML templates and read credits in PDFShift.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pdfshift_convert_to_pdf Convert to PDF
Convert an HTML document or a public URL to a PDF. Returns a `url` to the PDF (kept 2 days). Uses credits unless sandbox is true. PDFShift API: POST /convert/pdf.
| Parameter | Type | Description |
|---|---|---|
source * | string | HTML document or public http(s) URL to convert. PDFShift detects which one it is. |
filename | string | Output file name: 7 or more letters, digits, '-' or '_'. Omit for a generated name. |
format | string | Page size: Letter, Legal, Tabloid, Ledger, A0 to A5 (default A4), or WIDTHxHEIGHT with in, cm or mm (for example 210x297mm, or 1024xauto). |
landscape | boolean | true: landscape page. Default false (portrait). |
sandbox | boolean | true: watermarked test file that uses no credits. Default false: the conversion uses credits. |
pdfshift_convert_to_image Convert to image
Render an HTML document or a public URL as a PNG, JPEG or WEBP image. Returns a `url` to the image (kept 2 days). Uses credits unless sandbox is true. PDFShift API: POST /convert/{png|jpeg|webp}.
| Parameter | Type | Description |
|---|---|---|
format * | string | Image format. |
source * | string | HTML document or public http(s) URL to convert. PDFShift detects which one it is. |
filename | string | Output file name: 7 or more letters, digits, '-' or '_'. Omit for a generated name. |
fullpage | boolean | true: capture the whole scrollable page. Default false. |
sandbox | boolean | true: watermarked test file that uses no credits. Default false: the conversion uses credits. |
viewport | string | Browser window size in pixels, WIDTHxHEIGHT. Default 1280x1024. |
pdfshift_list_templates List templates
List the HTML templates stored on the PDFShift account. PDFShift API: GET /templates.
pdfshift_get_template_html Get template HTML
Return the raw HTML of one stored template. PDFShift API: GET /templates/{slug}.html.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Template slug (its unique id, as listed by pdfshift_list_templates). |
pdfshift_create_template Create template
Store a new HTML template on the PDFShift account under a unique slug. PDFShift API: POST /templates.
| Parameter | Type | Description |
|---|---|---|
content * | string | HTML content of the template. |
name * | string | Human-readable template name. |
slug * | string | Unique id for the template. It cannot be changed later. |
pdfshift_update_template Update template
Replace the HTML content of a stored template, and optionally its name. The slug cannot change. PDFShift API: PUT /templates/{slug}.
| Parameter | Type | Description |
|---|---|---|
content * | string | New HTML content. It replaces the whole template. |
slug * | string | Template slug (its unique id, as listed by pdfshift_list_templates). |
name | string | New template name. Omit to keep the current name. |
pdfshift_delete_template Delete template
Delete a stored template by slug. The template cannot be restored. PDFShift API: DELETE /templates/{slug}.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Template slug (its unique id, as listed by pdfshift_list_templates). |
pdfshift_get_account Get account
Get the PDFShift account details and the current plan. PDFShift API: GET /account.
pdfshift_get_credits_usage Get credits usage
Get the credits used and remaining in the current period. Check this before large batches of billed conversions. PDFShift API: GET /credits/usage.
pdfshift_list_plans List plans and prices
List the PDFShift subscription plans and their prices, credits and overage fields. With a key, the list can also show plans set up for this account. PDFShift API: GET /credits/pricing.
pdfshift_list_invoices List invoices
List the PDFShift invoices for the account. PDFShift API: GET /invoices.
pdfshift_list_logs List conversion logs
List recent conversion logs for the account, newest first, with optional filters. Use it to find a request id for pdfshift_get_log. PDFShift API: GET /logs.
| Parameter | Type | Description |
|---|---|---|
before | string | Return logs that happened before this ISO date-time. |
cursor | integer | Return logs after this log id (the integer id shown in an earlier reply). |
key | string | Only logs made with this API key, as PDFShift expects it. |
limit | integer | Number of log lines to return, 5 to 100. PDFShift default 20. |
status | string | Filter by outcome. Default all. |
pdfshift_get_log Get conversion log
Get the log of one conversion by its request id. PDFShift API: GET /logs/{request_id}.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | Request id of a conversion, as shown in its logs. |