CraftMyPDF MCP by usefulapi

v1.27.4
io.usefulapi/craftmypdf Checked 7 hours ago Published 14 days ago

Generate PDFs and images from CraftMyPDF templates; read templates, versions and usage.

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

craftmypdf_get_account_info Get account info

The CraftMyPDF account behind the API key: username, quota used (quota_counter) and quota total (quota_max), template count and limit, creation date. Check the quota before generating many documents. GET /get-account-info.

craftmypdf_list_transactions List transactions

Recent generation transactions of the account, newest first: transaction_ref, type (PDFGEN, PDFPREVIEW, ...), execution time, credits used, time, file size and result status. Use it to see what was billed. GET /list-transactions.

ParameterTypeDescription
limitintegerRecords to return, 1-300 (default 50).
offsetintegerRecords to skip (default 0). Use next_offset from the previous reply.

craftmypdf_list_templates List templates

List the PDF/image templates of the account: template_id, name, status, group, created and updated time. The template_id is what the generation tools need. Read only; templates cannot be edited here. GET /list-templates.

ParameterTypeDescription
group_namestringOnly templates of this group.
limitintegerRecords to return, 1-300 (default 50).
offsetintegerRecords to skip (default 0). Use next_offset from the previous reply.

craftmypdf_get_template Get template

One template: its name and the sample JSON data it expects (the placeholders to fill when generating). The full layout body is only returned with include_body (it can be very large and is cut). GET /get-template.

ParameterTypeDescription
template_id *stringCraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates).
include_bodybooleanAlso return the template layout JSON (default false; cut at 40000 characters).
versionstringTemplate version number (from craftmypdf_list_template_versions). Latest version when omitted.

craftmypdf_list_template_versions List template versions

The saved versions of a template (version number, description, time, whether it is retained). Use a version number when generating to pin the layout. GET /list-template-versions.

ParameterTypeDescription
template_id *stringCraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates).

craftmypdf_query_template_usage Query template usage

Usage statistics (how many generations) of up to 20 templates within an optional date range. Dates are ISO 8601 UTC date-times such as 2026-10-01T00:00:00Z. GET /query-template-usage.

ParameterTypeDescription
template_ids *array1-20 template ids.
end_datestringEnd, ISO 8601 UTC.
start_datestringStart, ISO 8601 UTC, e.g. 2026-10-01T00:00:00Z.

craftmypdf_get_pdf_info Get PDF info

Metadata of a PDF that CraftMyPDF downloads from a public https URL: page count, title, author, creator, producer, dates. May count against the account's rate limit. GET /get-pdf-info.

ParameterTypeDescription
url *stringPublic https URL of a PDF file.

craftmypdf_create_pdf Create PDF from template

WRITE: uses the CraftMyPDF account's own quota (credits; a successful generation is a billable transaction, typically 1 credit per document, and every call counts even with identical data). Generate ONE PDF from a template and your JSON data. Returns a hosted file URL (never file bytes) that expires after `expiration` minutes, plus the transaction reference and any anchors (page numbers for a table of contents). Look the template up with craftmypdf_list_templates / craftmypdf_get_template first. POST /create with export_type=json.

ParameterTypeDescription
data *objectThe JSON object that fills the template's {{placeholders}}, e.g. {"invoice_number":"INV38379","total_amount":82542.56}. The whole request must stay under about 3.8 MB.
template_id *stringCraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates).
expirationintegerMinutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).
image_resample_resintegerDownsample images to this DPI to shrink the PDF: 72, 150, 300, 600 or 1200.
output_filestringFile name of the output (default output.pdf).
versionstringTemplate version number (from craftmypdf_list_template_versions). Latest version when omitted.

craftmypdf_create_image Create image from template

WRITE: uses the CraftMyPDF account's own quota (credits; a successful generation is a billable transaction, typically 1 credit per document, and every call counts even with identical data). Generate ONE image (JPEG or PNG) from a template and your JSON data. Returns a hosted file URL (never file bytes) that expires after `expiration` minutes. POST /create-image with export_type=json.

ParameterTypeDescription
data *objectThe JSON object that fills the template's {{placeholders}}, e.g. {"invoice_number":"INV38379","total_amount":82542.56}. The whole request must stay under about 3.8 MB.
template_id *stringCraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates).
expirationintegerMinutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).
output_filestringFile name of the output (default output.jpg).
output_typestringImage type (default jpeg).
versionstringTemplate version number (from craftmypdf_list_template_versions). Latest version when omitted.

craftmypdf_create_pdf_from_templates Create one PDF from several templates

WRITE: uses the CraftMyPDF account's own quota (credits; a successful generation is a billable transaction, typically 1 credit per document, and every call counts even with identical data). Generate ONE combined PDF from 2-10 templates, each with its own data (or the shared `data`). Costs credits for each template rendered. Returns a hosted file URL that expires after `expiration` minutes. Uses the latest template versions. POST /create-merge with export_type=json.

ParameterTypeDescription
templates *array2-10 entries, rendered in order.
dataobjectShared data for entries without their own.
expirationintegerMinutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).
output_filestringFile name of the output (default output.pdf).
pagingstringPage numbering across the templates: reset (default) restarts at each template, continuous carries on.

craftmypdf_merge_pdfs Merge PDFs by URL

WRITE: uses the CraftMyPDF account's own quota (credits; a successful generation is a billable transaction, typically 1 credit per document, and every call counts even with identical data). Merge 2-10 existing PDFs, given as public https URLs, into ONE PDF. CraftMyPDF downloads the files from your URLs. Returns a hosted file URL that expires after `expiration` minutes. POST /merge-pdfs.

ParameterTypeDescription
urls *array2-10 public https URLs of PDF files, merged in this order.
expirationintegerMinutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).
output_filestringFile name of the output (default output.pdf).