Skip to main content
Glama
MCP PDF Server

MCP PDF Server

by SantosRojas

apply_pdf_security

Update PDF metadata and optionally encrypt documents with AES-256 while restricting printing or copying to control access.

Instructions

Actualiza metadatos y opcionalmente cifra el PDF con AES-256 y restricciones de impresión/copia. Acepta filePath absoluto permitido o relativo al workspace/output, y un outputDir opcional con las mismas reglas que generate_pdf. El cifrado requiere qpdf instalado.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filePath": "<filePath>"
    },
    "name": "apply_pdf_security"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYes
metadataNo
outputDirNo
overwriteNo
permissionsNo
userPasswordNo
ownerPasswordNo
outputFilenameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavioral facts: the AES-256 algorithm, print/copy restriction behavior, the hard qpdf dependency, and path resolution rules. It leaves a gap around mutation safety (whether the source file is modified in place or a new file is written), which is important for a write operation.

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?

Three sentences, front-loaded with the core action, followed by path rules and then the dependency note. No wasted words, though the dependency caveat could be folded more tightly.

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?

For a complex mutation tool with nested objects, no annotations, and no output schema, the description covers purpose, path handling, and the qpdf prerequisite. It omits how passwords drive encryption, overwrite/mutation semantics, and whether output is written elsewhere, so an agent is only adequately equipped.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for 8 parameters including nested objects, so the description must compensate, but it only clarifies filePath (absolute or workspace/output-relative) and outputDir. It never explains how encryption is actually triggered (userPassword vs ownerPassword), what overwrite does, or what outputFilename controls, leaving the security-critical credentials undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verbs and resources are stated: it updates metadata and optionally encrypts the PDF with AES-256 plus print/copy restrictions. This is clearly distinguishable from generate_pdf, merge_pdfs, and the listing/validation siblings, so an agent can identify the tool's job without opening the schema.

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

Usage Guidelines4/5

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

It conveys clear context: metadata update is the baseline and encryption is optional, and it names generate_pdf as the reference for outputDir rules. It stops short of explicit when-to-use versus when-not-to-use alternatives or exclusions, so it lands at clear-context-without-routing.

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