Skip to main content
Glama

PDF Password API - lock or unlock a PDF (AES-256)

pdf_protect
Read-onlyIdempotent

Add an AES-256 password to a PDF (mode=lock) or remove it when you know the password (mode=unlock). Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/call via x402 at https://radarbg.com/x402/pdf-protect.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "lock",
      "fileName": "sample.pdf",
      "password": "secret123",
      "fileContent": "JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PAovUHJvZHVjZXIgKHB5cGRmKQo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDEKL0tpZHMgWyA0IDAgUiBdCj4+CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAyIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Cj4+Ci9NZWRpYUJveCBbIDAuMCAwLjAgNTk1IDg0MiBdCi9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDU0IDAwMDAwIG4gCjAwMDAwMDAxMTMgMDAwMDAgbiAKMDAwMDAwMDE2MiAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDUKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjI1NgolJUVPRgo="
    },
    "name": "pdf_protect"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNolock or unlocklock
filesNoOr several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)
fileNameNoFile name with extension, e.g. report.pdf
passwordNoThe password
fileContentNoThe file as base64 (a data: URI is fine; 20 MB total decoded limit per call)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / fileContent / description
      Previous value: -"The file as base64 (a data: URI is fine)"New value: +"The file as base64 (a data: URI is fine; 20 MB total decoded limit per call)"
    • changedInput schema / properties / files / description
      Previous value: -"Or several files: [{fileName, fileContent (base64)}]"New value: +"Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)"
    • addedInput schema / properties / files / maxItems
      Added value: +60
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, openWorldHint), the description discloses that processing runs server-side, that files are deleted immediately and nothing is stored, and that encryption is AES-256. It also surfaces concrete operational constraints: 5 free calls/day per IP, paid tiers via X-API-Key or x402 at $0.005/call.

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?

The core behavior and mode distinction are front-loaded in the first sentence, with operational details following. The pricing URL and x402 endpoint add length but carry decision-relevant information; the section is dense but not padded.

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 file-transformation tool with no output schema, the description covers privacy, auth, rate limits, and cost well. The one gap is that it never states what the call returns (presumably a protected PDF as base64), which an agent must infer.

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 coverage is 100%, so every parameter (mode, fileName, fileContent, files, password) is already documented in the schema, including the 20 MB limit and 60-file batch cap. The description adds no parameter-level meaning beyond mentioning the mode values, so the baseline 3 is appropriate.

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?

The description names a specific verb and resource (add an AES-256 password to a PDF) and explicitly covers both modes: lock and unlock. It also states the precondition for unlocking (you must know the password), which lets an agent distinguish this from sibling PDF tools like pdf_flatten or pdf_sign.

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?

Mode selection guidance is clear: mode=lock adds a password, mode=unlock removes one only when the password is known. It does not route the agent to alternatives (e.g., when to use pdf_flatten to strip restrictions instead), but the lock/unlock conditions are explicit enough for correct invocation.

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