Skip to main content
Glama

Create PDF from template

craftmypdf_create_pdf
Destructive

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe 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.
versionNoTemplate version number (from craftmypdf_list_template_versions). Latest version when omitted.
expirationNoMinutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5).
output_fileNoFile name of the output (default output.pdf).
template_idYesCraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates).
image_resample_resNoDownsample images to this DPI to shrink the PDF: 72, 150, 300, 600 or 1200.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare non-idempotent and destructive, and the description reinforces this with 'every call counts even with identical data' and credit billing per document. It also discloses the return shape (hosted URL that expires, never file bytes), the transaction reference, and anchors, which annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a 'WRITE:' label that immediately signals the mutation/cost profile, and the billing caveat is genuinely useful. It is dense but nearly every clause carries operational value; only minor redundancy in restating the expiry behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter mutation tool with no output schema, the description covers cost model, prerequisite lookup order, return format and lifetimes, and the transaction/anchors payload. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each of the six parameters is already documented in the schema. The description adds only the expiry consequence of `expiration` (hosted file deleted), which the schema also states; no new syntax or constraint meaning is contributed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Generate ONE PDF from a template and your JSON data') and the 'ONE' framing implicitly contrasts with the sibling craftmypdf_create_pdf_from_templates. It never names that sibling, so the differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear prerequisite chain ('Look the template up with craftmypdf_list_templates / craftmypdf_get_template first') and names the underlying POST /create. It does not, however, say when to choose this tool over craftmypdf_create_pdf_from_templates.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.