PDFShift MCP by usefulapi

v1.1.0
io.usefulapi/pdfshift Checked 8 hours ago Published 2 days ago

Convert 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.

ParameterTypeDescription
source *stringHTML document or public http(s) URL to convert. PDFShift detects which one it is.
filenamestringOutput file name: 7 or more letters, digits, '-' or '_'. Omit for a generated name.
formatstringPage size: Letter, Legal, Tabloid, Ledger, A0 to A5 (default A4), or WIDTHxHEIGHT with in, cm or mm (for example 210x297mm, or 1024xauto).
landscapebooleantrue: landscape page. Default false (portrait).
sandboxbooleantrue: 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}.

ParameterTypeDescription
format *stringImage format.
source *stringHTML document or public http(s) URL to convert. PDFShift detects which one it is.
filenamestringOutput file name: 7 or more letters, digits, '-' or '_'. Omit for a generated name.
fullpagebooleantrue: capture the whole scrollable page. Default false.
sandboxbooleantrue: watermarked test file that uses no credits. Default false: the conversion uses credits.
viewportstringBrowser 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.

ParameterTypeDescription
slug *stringTemplate 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.

ParameterTypeDescription
content *stringHTML content of the template.
name *stringHuman-readable template name.
slug *stringUnique 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}.

ParameterTypeDescription
content *stringNew HTML content. It replaces the whole template.
slug *stringTemplate slug (its unique id, as listed by pdfshift_list_templates).
namestringNew 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}.

ParameterTypeDescription
slug *stringTemplate 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.

ParameterTypeDescription
beforestringReturn logs that happened before this ISO date-time.
cursorintegerReturn logs after this log id (the integer id shown in an earlier reply).
keystringOnly logs made with this API key, as PDFShift expects it.
limitintegerNumber of log lines to return, 5 to 100. PDFShift default 20.
statusstringFilter 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}.

ParameterTypeDescription
request_id *stringRequest id of a conversion, as shown in its logs.