Skip to main content
Glama
GerardoBarrera

PDFMakerAPI MCP Server

Create PDF Document

create_document

Creates professional PDF documents (invoices, receipts, certificates, reports) and returns a shareable link to preview, edit, and download.

Instructions

Create a professional, shareable PDF document — invoices, receipts, certificates, reports, resumes, letters, and more. Returns a link that opens the document in the PDFMakerAPI editor, where the user can preview it, edit any field, and download the PDF.

Design a THOROUGH, realistic document (don't leave it sparse) that exactly follows this model, then pass it as document.

DOCUMENT MODEL (PDFMakerAPI) Document:

  • id: string (short slug)

  • name: string

  • description: string (one short sentence)

  • pageSize: "letter" | "a4" | "legal" | "letter-landscape" | "a4-landscape" | "square" (default "a4")

  • pageBackgroundColor: hex string (default "#ffffff")

  • margin: "none" | "sm" | "md" | "lg" — page margin; default "lg"

  • gap: "none" | "sm" | "md" | "lg" — vertical spacing between top-level sections; default "lg"

  • variables: Variable[] — every {{placeholder}} you use MUST be declared here

  • children: Node[] — the document body, top to bottom

Variable: { id, name (snake_case, used as {{name}}), label (human), type: "text"|"date"|"number"|"currency", defaultValue?: string }

Node (every node has: id, name, width: "full"|"1/2"|"1/3"|"1/4"|"2/3"|"3/4"|"auto", order: number, align?: "left"|"center"|"right", style?: NodeStyle):

  • container: { type:"container", layout:{ direction:"row"|"column", gap:"none"|"sm"|"md"|"lg", justify?:"start"|"center"|"end"|"between", alignItems?:"start"|"center"|"end"|"stretch" }, children: Node[] }

  • text: { type:"text", content: string (supports \n and {{vars}}), fontSize?:"xs"|"sm"|"base"|"lg"|"xl", fontWeight?:"normal"|"medium"|"semibold"|"bold" }

  • table: { type:"table", columns: { id, name (data key), label (header), width?: "40%", align?: "left"|"center"|"right" }[], rowVariable: string }

  • spacer: { type:"spacer", height: "sm"|"md"|"lg"|"xl" }

  • divider: { type:"divider", lineStyle?: "solid"|"dashed"|"dotted" }

NodeStyle: { backgroundColor?: hex, backgroundMode?: "none"|"solid"|"gradient", gradientTo?: hex, textColor?: hex, padding?: "none"|"sm"|"md"|"lg"|"xl", borderRadius?: "none"|"sm"|"md"|"lg", fullBleed?: boolean }

VARIABLES — how data is inserted

  • In text content, insert a value with double braces and the exact snake_case name, e.g. {{invoice_number}} — no spaces inside the braces. Every {{name}} used MUST be declared in variables[].

  • Give every variable a realistic defaultValue so the result looks complete.

  • TABLES do NOT use {{}}. A table renders one row per item in its rowVariable array, pulling item[column.name] for each cell — so each column "name" must match the row object's key. The rowVariable variable's defaultValue must be a JSON-encoded string of the row array, e.g. JSON.stringify([{ description: "Brand design", qty: "1", amount: "$2,400.00" }]).

RULES

  • Use containers (direction:"row") to place items side by side.

  • For label/value pairs (dates, totals, "Bill To", reference numbers), nest a direction:"row" container with two text children — a BOLD label (fontWeight:"bold") and the value as a {{variable}} — each with a width (e.g. label "1/3", value "2/3") so they align in columns. Stack such rows in a column container.

  • Use a table node for any repeating rows (line items, attendees) and set rowVariable.

  • Spacing between sections comes from the document "gap" (default "lg") — do NOT insert spacer nodes between top-level sections.

  • Table column alignment: left-align text columns, right-align money/number columns, center short codes/status; a header's alignment matches its column.

  • Every id must be unique. Keep it clean and professional.

After the tool returns a url, share it with the user and tell them they can open it to preview, edit any field, and download the PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesThe PDFMakerAPI Document to create. Follow the DOCUMENT MODEL in this tool's description.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesShareable link that opens the document in the PDFMakerAPI editor to preview, edit, and download the PDF.
idYesThe stored document id.
Behavior5/5

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

Annotations indicate a write operation, and the description confirms creation, returning a URL to an editor rather than a direct PDF. It adds extensive behavioral context: preview, edit, download capability, and detailed document model rules. No contradictions with annotations.

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?

The description is long but well-structured, starting with purpose, then model, variables, and rules. Front-loading works. Every sentence adds value; however, some details could be streamlined without losing clarity.

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?

Given a single parameter with full schema coverage and an output schema, the description fully explains the document model, variable usage, layout rules, and return behavior. No gaps remain for an AI agent to understand tool invocation.

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

Parameters5/5

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

The input schema has 100% coverage but provides minimal descriptions. The tool description compensates with a comprehensive DOCUMENT MODEL detailing each field, types, defaults, and usage rules. This adds immense semantic meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool creates PDF documents like invoices, receipts, certificates, etc. It uses a specific verb 'create' and identifies the resource as a PDFMakerAPI document. Despite no siblings, it effectively communicates its purpose.

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?

The description implies when to use (generate a PDF) and provides guidance on how to design the document. However, it does not explicitly state when not to use or alternative tools, but with no siblings, this is a minor gap.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GerardoBarrera/pdfmakerapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server