Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

document_to_pdf

Convert DOC, DOCX, XLS, and other documents or images to PDF from a URL for consistent sharing or archiving.

Instructions

Convert various document types (DOC, DOCX, RTF, TXT, XLS, XLSX, CSV, HTML, JPG, PNG, TIFF, WEBP) into PDF.
Ref: https://developer.pdf.co/api/pdf-from-document/doc.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the source file (DOC, DOCX, RTF, TXT, XPS). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.
nameNoFile name for the generated output. (Optional)
pagesNoComma-separated page indices (e.g., '0, 1, 2-' or '1, 3-7'). Use '!' for inverted page numbers (e.g., '!0' for last page). Processes all pages if None. (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
autosizeNoControls automatic page sizing. If true, page dimensions adjust to content. If false, uses worksheet’s page setup. (Optional)
profilesNoExtra engine options for this endpoint as a JSON object encoded in a string. The options differ per endpoint; see https://developer.pdf.co/api/profiles. (Optional)
expirationNoLifetime of the output link in minutes; the output file is deleted afterwards. API default is 60; the maximum depends on the plan. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name if required to access source url. (Optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.0.11
    • addedInput schema / properties / expiration
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lifetime of the output link in minutes; the output file is deleted afterwards. API default is 60; the maximum depends on the plan. (Optional)",
      +  "title": "Expiration"
      +}
    • addedInput schema / properties / profiles
      Added value: +{
      +  "default": "",
      +  "description": "Extra engine options for this endpoint as a JSON object encoded in a string. The options differ per endpoint; see https://developer.pdf.co/api/profiles. (Optional)",
      +  "title": "Profiles",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden but says nothing about authentication (api_key), whether conversion is synchronous or job-based, or what is returned. Output handling is only implied by the schema's 'expiration' parameter describing a deleted output link, not by the description.

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?

A single front-loaded sentence with the format list in parentheses, plus one reference link. Nothing is bloated, though the bare link contributes little beyond the schema's own profile link.

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

Completeness4/5

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

For a 9-parameter tool with complete schema coverage but no output schema, the essential facts (what converts, to what) are present and the input contract lives in the schema. The missing piece is whether output is a downloadable file/link and how errors or jobs surface, which would materially help an agent chain calls.

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 parameter meaning is already fully documented in the schema and the baseline of 3 applies. The description adds no parameter-level nuance, and its type list (JPG, PNG, TIFF, WEBP, CSV) is broader than the url parameter's own list (DOC, DOCX, RTF, TXT, XPS), which could mislead an agent about image input handling.

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 ('Convert ... into PDF') and enumerates supported input types, so the agent knows exactly what it produces. It does not differentiate from siblings such as html_to_pdf, image_to_pdf, excel_to_pdf, or csv_to_pdf, whose formats are all listed here, leaving format-overlap ambiguity.

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

Usage Guidelines2/5

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

No guidance on when to use this generic converter versus the format-specific siblings (html_to_pdf, excel_to_pdf, image_to_pdf), and no prerequisites such as needing a publicly accessible URL. The only extra pointer is a documentation link.

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