CraftMyPDF MCP by usefulapi
Generate PDFs and images from CraftMyPDF templates; read templates, versions and usage.
我該用這個嗎
品質與安全性
發現項目(6)
- HIGH
- MEDIUM在 craftmypdf_get_template 中
- LOW在 craftmypdf_list_template_versions 中
- LOW在 craftmypdf_query_template_usage 中
- LOW在 craftmypdf_create_pdf_from_templates 中
- INFO在 craftmypdf_get_template 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"craftmypdf": {
"url": "https://craftmypdf.usefulapi.io/mcp"
}
}
}遠端端點
https://craftmypdf.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(11)
🟢craftmypdf_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.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_list_transactions(limit, offset)
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.
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"description": "Records to return, 1-300 (default 50).",
"type": "integer",
"minimum": 1,
"maximum": 300
},
"offset": {
"description": "Records to skip (default 0). Use next_offset from the previous reply.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_list_templates(limit, offset, group_name)
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.
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"description": "Records to return, 1-300 (default 50).",
"type": "integer",
"minimum": 1,
"maximum": 300
},
"offset": {
"description": "Records to skip (default 0). Use next_offset from the previous reply.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"group_name": {
"description": "Only templates of this group.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_get_template(template_id, version, include_body)
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.
輸入結構描述
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
},
"version": {
"type": "string",
"pattern": "^\\d{1,6}$",
"description": "Template version number (from craftmypdf_list_template_versions). Latest version when omitted."
},
"include_body": {
"description": "Also return the template layout JSON (default false; cut at 40000 characters).",
"type": "boolean"
}
},
"required": [
"template_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_list_template_versions(template_id)
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.
輸入結構描述
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
}
},
"required": [
"template_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_query_template_usage(template_ids, start_date, end_date)
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.
輸入結構描述
{
"type": "object",
"properties": {
"template_ids": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
},
"description": "1-20 template ids."
},
"start_date": {
"description": "Start, ISO 8601 UTC, e.g. 2026-10-01T00:00:00Z.",
"type": "string",
"maxLength": 40,
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?Z$"
},
"end_date": {
"description": "End, ISO 8601 UTC.",
"type": "string",
"maxLength": 40,
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?Z$"
}
},
"required": [
"template_ids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢craftmypdf_get_pdf_info(url)
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.
輸入結構描述
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"description": "Public https URL of a PDF file."
}
},
"required": [
"url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴craftmypdf_create_pdf(template_id, data, version, expiration, output_file, ...)
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.
輸入結構描述
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The 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."
},
"version": {
"type": "string",
"pattern": "^\\d{1,6}$",
"description": "Template version number (from craftmypdf_list_template_versions). Latest version when omitted."
},
"expiration": {
"description": "Minutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).",
"type": "integer",
"minimum": 1,
"maximum": 10080
},
"output_file": {
"description": "File name of the output (default output.pdf).",
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9 _.-]{0,98}$"
},
"image_resample_res": {
"description": "Downsample images to this DPI to shrink the PDF: 72, 150, 300, 600 or 1200.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"template_id",
"data"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴craftmypdf_create_image(template_id, data, version, expiration, output_type, ...)
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.
輸入結構描述
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The 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."
},
"version": {
"type": "string",
"pattern": "^\\d{1,6}$",
"description": "Template version number (from craftmypdf_list_template_versions). Latest version when omitted."
},
"expiration": {
"description": "Minutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).",
"type": "integer",
"minimum": 1,
"maximum": 10080
},
"output_type": {
"description": "Image type (default jpeg).",
"type": "string",
"enum": [
"jpeg",
"png"
]
},
"output_file": {
"description": "File name of the output (default output.jpg).",
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9 _.-]{0,98}$"
}
},
"required": [
"template_id",
"data"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴craftmypdf_create_pdf_from_templates(templates, data, paging, expiration, output_file)
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.
輸入結構描述
{
"type": "object",
"properties": {
"templates": {
"minItems": 2,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"template_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{4,64}$",
"description": "CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates)."
},
"data": {
"description": "Data for this template; falls back to the shared data.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"template_id"
]
},
"description": "2-10 entries, rendered in order."
},
"data": {
"description": "Shared data for entries without their own.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"paging": {
"description": "Page numbering across the templates: reset (default) restarts at each template, continuous carries on.",
"type": "string",
"enum": [
"continuous",
"reset"
]
},
"expiration": {
"description": "Minutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).",
"type": "integer",
"minimum": 1,
"maximum": 10080
},
"output_file": {
"description": "File name of the output (default output.pdf).",
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9 _.-]{0,98}$"
}
},
"required": [
"templates"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴craftmypdf_merge_pdfs(urls, expiration, output_file)
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.
輸入結構描述
{
"type": "object",
"properties": {
"urls": {
"minItems": 2,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"maxLength": 2000
},
"description": "2-10 public https URLs of PDF files, merged in this order."
},
"expiration": {
"description": "Minutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).",
"type": "integer",
"minimum": 1,
"maximum": 10080
},
"output_file": {
"description": "File name of the output (default output.pdf).",
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9 _.-]{0,98}$"
}
},
"required": [
"urls"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據