Skip to main content
Glama

Protect or unlock a PDF

protect_pdf
Read-onlyIdempotent

Protect a PDF with AES-256, or unlock one when the password is known. action is protect or unlock. password is the user password. ownerPassword is optional. permissions cover printing, copying, modifying, annotating, filling forms, accessibility, and assembly. Send base64 or a public URL. Private addresses are refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "protect_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic URL of a PDF. Private and local addresses are refused. Provide data or url.
dataNoPDF bytes as base64 or a data URI. Decoded size is capped at 10 MB. Provide data or url.
actionNoprotect
filenameNo
mimeTypeNo
passwordNoUser password. Required to protect or unlock. Unlock only works when this is the known password.
permissionsNo
ownerPasswordNoOwner password. Blank uses the user password.

Output Schema

NameRequiredDescriptionDefault
dataYesPDF bytes as base64.
bytesYes
encryptedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so the safety profile is covered. The description adds useful behavior beyond them: AES-256 strength, that unlock requires the known password, and that private addresses are refused. It does not say what the tool returns or whether the input file is ever modified server-side, but with an output schema that gap is minor.

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?

Front-loaded with the core verb and modes, then parameter semantics in short sentences with no wasted framing. The permissions sentence largely re-lists schema property names, which is the one redundant stretch.

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

Completeness5/5

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

For an 8-parameter tool with a nested permissions object and an existing output schema, the description covers mode selection, credential requirements and the security-relevant address restriction. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

At 50% schema coverage the description carries real weight and does: it explains the action enum values, that password is the user password and is required for both modes, that ownerPassword is optional, and it enumerates the permission categories matching the nested object. Only filename and mimeType are left undocumented in both places.

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?

States a specific verb and resource plus the two modes ('Protect a PDF with AES-256, or unlock one when the password is known'), which cleanly separates it from the other PDF siblings such as compress_pdf, merge_pdf and split_pdf.

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?

Gives clear use conditions: choose action protect or unlock, and unlock only works when the password is already known. It does not name alternatives or explicit exclusions, but the mode selection is unambiguous.

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.