PDF Generator API MCP by usefulapi
v1.1.0Generate PDFs from templates and convert HTML or web pages to PDF in PDF Generator API.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pdfgeneratorapi_get_workspace Get workspace
Get the connected workspace: its numeric id, identifier, whether it is the master workspace, and whether the key owner is an admin. Good first call to confirm the connection. PDF Generator API: GET /workspaces/{workspaceIdentifier}.
pdfgeneratorapi_list_templates List templates
List the document templates in the workspace (id, name, tags, editor type, timestamps). Use it to find a template id for pdfgeneratorapi_generate_document. PDF Generator API: GET /templates.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default 1). |
per_page | integer | Results per page (max 100). |
search | string | Filter templates by name. |
pdfgeneratorapi_get_template Get template
Get one template with its layout, pages and data settings. Use it to see what the template draws. PDF Generator API: GET /templates/{templateId}.
| Parameter | Type | Description |
|---|---|---|
template_id * | string | The template id (from pdfgeneratorapi_list_templates). |
pdfgeneratorapi_get_template_data_fields Get template data fields
List the data fields one template reads (the keys to put in the data object of pdfgeneratorapi_generate_document). Call it before you generate. PDF Generator API: GET /templates/{templateId}/data.
| Parameter | Type | Description |
|---|---|---|
template_id * | string | The template id (from pdfgeneratorapi_list_templates). |
pdfgeneratorapi_list_documents List generated documents
List documents generated with output url and still stored (each has a public link, kept 30 days). Filter by template, date range or name. PDF Generator API: GET /documents.
| Parameter | Type | Description |
|---|---|---|
end_date | string | Created on or before this date (yyyy-mm-dd). |
page | integer | Page number (default 1). |
per_page | integer | Results per page (max 100). |
search | string | Filter by document name. |
start_date | string | Created on or after this date (yyyy-mm-dd). |
template_id | string | Only documents made from this template id. |
pdfgeneratorapi_generate_document Generate document from template
Merge a template with data and create a PDF (or HTML). Default output url stores the file on PDF Generator API for 30 days and returns its public link; this uses one generation from the plan quota. output base64 returns the whole file inline, which can be large. Set testing true to add the vendor's test marking. PDF Generator API: POST /documents/generate.
| Parameter | Type | Description |
|---|---|---|
data * | object | Field values for the template, keyed by the names from pdfgeneratorapi_get_template_data_fields. |
template_id * | string | The template id (from pdfgeneratorapi_list_templates). |
format | string | Output format (default pdf). |
name | string | Document name shown in the vendor's document list. |
output | string | url = stored public link for 30 days (default); base64 = inline file. |
testing | boolean | true = mark the output as a test document (default false). |
version_id | integer | Template version id (default: the current version). |
pdfgeneratorapi_copy_template Copy template
Copy an existing template under a new name. The original template is not changed. Use it to make a variant before you edit the copy in the vendor's editor. PDF Generator API: POST /templates/{templateId}/copy.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the new template copy. |
template_id * | string | The template id (from pdfgeneratorapi_list_templates). |
pdfgeneratorapi_convert_html_to_pdf Convert HTML to PDF
Render an HTML string to a PDF and return it inline as base64. Keep the HTML small: the base64 reply can be large. Nothing is stored on the vendor side. PDF Generator API: POST /conversion/html2pdf.
| Parameter | Type | Description |
|---|---|---|
content * | string | The full HTML document or fragment to render. |
filename | string | File name to report in the reply. |
orientation | string | Page orientation (default portrait). |
paper_size | string | Paper size (default a4). |
pdfgeneratorapi_convert_url_to_pdf Convert web page to PDF
Load a public web page in the vendor's browser and return it as a PDF, inline as base64. The URL must be reachable from the internet; private or login-only pages fail. Nothing is stored on the vendor side. PDF Generator API: POST /conversion/url2pdf.
| Parameter | Type | Description |
|---|---|---|
url * | string | The public http or https page to render. |
filename | string | File name to report in the reply. |
orientation | string | Page orientation (default portrait). |
paper_size | string | Paper size (default a4). |