Skip to main content
Glama

PDF.co MCP Server

Official
by pdfdotco
MIT License
1
  • Apple
  • Linux

email_to_pdf

Convert email files (MSG, EML) to PDF, embedding or converting attachments as needed. Specify page size, orientation, and margins for customized output. Integrates with cloud storage and local file uploads for streamlined processing.

Instructions

Convert email to PDF. Ref: https://developer.pdf.co/api-reference/pdf-from-email.md

Input Schema

NameRequiredDescriptionDefault
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
convertAttachmentsNoSet to false if you don’t want to convert attachments from the original email and want to embed them as original files (as embedded PDF attachments). Converts attachments that are supported by the PDF.co API (DOC, DOCx, HTML, PNG, JPG etc.) into PDF format and then merges into output final PDF. Non-supported file types are added as PDF attachments (Adobe Reader or another viewer may be required to view PDF attachments).
embedAttachmentsNoSet to true to automatically embeds all attachments from original input email MSG or EML files into the final output PDF. Set it to false if you don’t want to embed attachments so it will convert only the body of the input email. True by default.
marginsNoSet to CSS style margins like 10px, 5mm, 5in for all sides or 5px 5px 5px 5px (the order of margins is top, right, bottom, left). (Optional)
orientationNoSet to Portrait or Landscape. Portrait is set by default. (Optional)
paperSizeNoA4 is set by default. Can be Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A4, A5, A6 or a custom size. Custom size can be set in px (pixels), mm or in (inches) with width and height separated by space like this: 200 300, 200px 300px, 200mm 300mm, 20cm 30cm or 6in 8in. (Optional)
urlYesURL to the source file (MSG, EML). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.

Input Schema (JSON Schema)

{ "properties": { "api_key": { "default": null, "description": "PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)", "title": "Api Key", "type": "string" }, "convertAttachments": { "default": true, "description": "Set to false if you don’t want to convert attachments from the original email and want to embed them as original files (as embedded PDF attachments). Converts attachments that are supported by the PDF.co API (DOC, DOCx, HTML, PNG, JPG etc.) into PDF format and then merges into output final PDF. Non-supported file types are added as PDF attachments (Adobe Reader or another viewer may be required to view PDF attachments).", "title": "Convertattachments", "type": "boolean" }, "embedAttachments": { "default": true, "description": "Set to true to automatically embeds all attachments from original input email MSG or EML files into the final output PDF. Set it to false if you don’t want to embed attachments so it will convert only the body of the input email. True by default.", "title": "Embedattachments", "type": "boolean" }, "margins": { "default": "", "description": "Set to CSS style margins like 10px, 5mm, 5in for all sides or 5px 5px 5px 5px (the order of margins is top, right, bottom, left). (Optional)", "title": "Margins", "type": "string" }, "orientation": { "default": "", "description": "Set to Portrait or Landscape. Portrait is set by default. (Optional)", "title": "Orientation", "type": "string" }, "paperSize": { "default": "", "description": "A4 is set by default. Can be Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A4, A5, A6 or a custom size. Custom size can be set in px (pixels), mm or in (inches) with width and height separated by space like this: 200 300, 200px 300px, 200mm 300mm, 20cm 30cm or 6in 8in. (Optional)", "title": "Papersize", "type": "string" }, "url": { "description": "URL to the source file (MSG, EML). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.", "title": "Url", "type": "string" } }, "required": [ "url" ], "type": "object" }

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/pdfdotco/pdfco-mcp'

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