Skip to main content
Glama

pdf_protect

Password-Protect PDF — Add a password to a PDF to prevent unauthorised opening or printing. [category: pdf]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesInput PDF (max 25MB)
passwordNoOne password used for both opening the file and unlocking its permissions. Leave it blank only if you set an open password or a permissions password below instead - one of the three is needed.
encryptionNoHow strongly the file is locked.aes256
outputNameNoOptional custom output filename.
permissionsNoWhat a reader is still allowed to do after they enter the password. Use any of print, copy, edit, annotate, separated by commas - or the single word all. A word we do not recognise is ignored, and if none of them are recognised the reader can do nothing at all, so leave this blank rather than guessing.
userPasswordNoOptional separate open (user) password.
ownerPasswordNoOptional separate permissions (owner) password.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / ownerPassword / x-ui / unset_label
      Previous value: -"Same as the open password"New value: +"Same as the open password (random if you limit permissions)"
    • changedInput schema / properties / userPassword / x-ui / unset_label
      Previous value: -"No password to open it"New value: +"Same as Password above"
  2. Changed3 schema fields changed
    • addedInput schema / properties / outputName / x-ui
      Added value: +{
      +  "unset_label": "Named after your file"
      +}
    • addedInput schema / properties / ownerPassword / x-ui
      Added value: +{
      +  "unset_label": "Same as the open password"
      +}
    • addedInput schema / properties / userPassword / x-ui
      Added value: +{
      +  "unset_label": "No password to open it"
      +}
  3. Changed9 schema fields changed
    • changedInput schema / properties / encryption / description
      Previous value: -"Encryption strength."New value: +"How strongly the file is locked."
    • addedInput schema / properties / encryption / x-ui
      Added value: +{
      +  "labels": {
      +    "aes128": "AES-128 (compatible)",
      +    "aes256": "AES-256 (strongest)"
      +  }
      +}
    • changedInput schema / properties / password / description
      Previous value: -"Sets BOTH the user and owner password. May be omitted only when userPassword or ownerPassword is provided instead."New value: +"One password used for both opening the file and unlocking its permissions. Leave it blank only if you set an open password or a permissions password below instead - one of the three is needed."
    • addedInput schema / properties / password / title
      Added value: +"Password"
    • removedInput schema / properties / permissions / default
      Removed value: -"print"
    • changedInput schema / properties / permissions / description
      Previous value: -"What a reader is still allowed to do after the password is entered."New value: +"What a reader is still allowed to do after they enter the password. Use any of print, copy, edit, annotate, separated by commas - or the single word all. A word we do not recognise is ignored, and if none of them are recognised the reader can do nothing at all, so leave this blank rather than guessing."
    • removedInput schema / properties / permissions / enum
      Removed value: -[
      -  "all",
      -  "print",
      -  "print,copy",
      -  "copy",
      -  "annotate",
      -  "edit"
      -]
    • removedInput schema / properties / permissions / x-ui
      Removed value: -{
      -  "labels": {
      -    "all": "Allow everything",
      -    "annotate": "Commenting only",
      -    "copy": "Copying text only",
      -    "edit": "Editing only",
      -    "print": "Printing only",
      -    "print,copy": "Printing and copying text"
      -  }
      -}
    • changedInput schema / required
      Previous value: -[
      -  "file",
      -  "password"
      -]New value: +[
      +  "file"
      +]
  4. Changed4 schema fields changed
    • addedInput schema / properties / permissions / default
      Added value: +"print"
    • changedInput schema / properties / permissions / description
      Previous value: -"Comma-separated permissions to ALLOW: print, copy, edit, modify, annotate, all. Empty = pdfcpu defaults."New value: +"What a reader is still allowed to do after the password is entered."
    • addedInput schema / properties / permissions / enum
      Added value: +[
      +  "all",
      +  "print",
      +  "print,copy",
      +  "copy",
      +  "annotate",
      +  "edit"
      +]
    • addedInput schema / properties / permissions / x-ui
      Added value: +{
      +  "labels": {
      +    "all": "Allow everything",
      +    "annotate": "Commenting only",
      +    "copy": "Copying text only",
      +    "edit": "Editing only",
      +    "print": "Printing only",
      +    "print,copy": "Printing and copying text"
      +  }
      +}
  5. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already indicate this is not read-only (readOnlyHint=false) and not destructive (destructiveHint=false). The description adds the outcome (prevents opening/printing) but does not disclose whether a new file is returned, whether the original is modified, or how encryption settings affect the result. No contradiction 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.

Conciseness5/5

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

One compact sentence delivers the action and purpose immediately, with a category tag at the end. There is no redundant wording, and every element contributes.

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

Completeness3/5

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

With seven parameters and no output schema, the description leaves some gaps: it does not describe what the tool returns (e.g., a password-protected PDF file) or whether the original file is preserved. The individual parameter descriptions in the schema compensate for most usage questions, so the definition is adequate but not fully complete.

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?

The input schema covers 100% of parameters with descriptions, including detailed guidance for password, permissions, and encryption options. The tool description itself adds no parameter-specific meaning, so the baseline score 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?

The description states a specific action, 'Add a password to a PDF', and the intended effect, preventing unauthorized opening or printing. It clearly distinguishes from most sibling tools like pdf_merge or pdf_compress, though it does not explicitly name the inverse tool pdf_unlock. This is clear enough to understand the tool's role among many PDF operations.

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

Usage Guidelines3/5

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

The description implies the use case—when a PDF needs password protection—but provides no explicit guidance about when not to use it or which alternative to choose (e.g., pdf_unlock for removing protection, pdf_watermark for visible markings). No prerequisites or exclusions are mentioned, leaving the agent to infer from the tool name and siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources