Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

pdf_add_password

Encrypt PDF documents by adding owner and user passwords, then set permissions to control printing, copying, editing, and form filling.

Instructions

Add password protection to a PDF file.
Ref: https://developer.pdf.co/api/pdf-password/add.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the source PDF file. 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)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
passwordNoPassword of the PDF file if it's already password-protected. (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)
print_qualityNoAllowed printing quality. Valid values: HighResolution, LowResolution.
user_passwordNoThe optional user password will be asked for viewing and printing document.
owner_passwordYesThe main owner password that is used for document encryption and for setting/removing restrictions.
allow_fill_formsNoAllow or prohibit the filling of interactive form fields (including signature fields) in the PDF documents.
allow_print_documentNoAllow or prohibit printing PDF document.
encryption_algorithmNoEncryption algorithm. Valid values: RC4_40bit, RC4_128bit, AES_128bit, AES_256bit. AES_128bit or higher is recommended.AES_256bit
allow_modify_documentNoAllow or prohibit modification of PDF document.
allow_assembly_documentNoAllow or prohibit assembling the document.
allow_content_extractionNoAllow or prohibit copying content from PDF document.
allow_modify_annotationsNoAllow or prohibit interacting with text annotations and forms in PDF document.
allow_accessibility_supportNoAllow or prohibit content extraction for accessibility needs.

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

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not state that this is a write/mutating operation producing a new protected file, what the result is (presumably a link with a limited lifetime), or that permission flags default to prohibited. These gaps matter for a 19-parameter mutation tool.

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

Conciseness3/5

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

The description is a single front-loaded sentence, which is efficient, but it is under-specified rather than concise. The reference URL adds a pointer but is not integrated into actionable guidance.

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

Completeness2/5

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

For a tool with 19 parameters, no annotations, and no output schema, the description says nothing about what the tool returns (a link?), that the output expires, or which permissions the owner_password controls. The rich schema compensates partially, but an agent still lacks behavioral context.

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 every parameter including enums like encryption_algorithm and print_quality is already documented in the schema. The description adds no extra meaning beyond what the schema provides, so the baseline of 3 applies.

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 and resource: 'Add password protection to a PDF file.' An agent can immediately distinguish this from the sibling pdf_remove_password. It stops short of naming that sibling or clarifying scope, but the operation itself is unambiguous.

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?

There is no guidance on when to use this versus alternatives (e.g., pdf_remove_password, or upload_file for local sources), no prerequisites, and no mention of what to do if the source PDF is already encrypted. The only pointer is a raw documentation URL.

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