Skip to main content
Glama

Protect a local PDF

abox_pdf_protect

Encrypt a PDF with AES-256 or AES-128 using passwords read from local files, apply optional print/copy/change restrictions, and verify the output by reopening and decrypting it.

Instructions

Encrypt an unencrypted or blank-open-password PDF with revision 6 AES-256 (default) or revision 4 AES-128, using passwords read from local UTF-8 files. Optional print/copy/change permission flags are advisory and depend on the viewer. Reopens and decrypts the new PDF to verify its reachable object graph and page count. Passwords never enter tool arguments or results. No password guessing.

Input Schema

NameRequiredDescriptionDefault
revisionNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.
restrict_copyNo
restrict_printNo
restrict_changeNo
open_password_fileNoAbsolute path to an exact UTF-8 password file; contents, BOM and final newline are not trimmed. Never put the password itself into arguments.
owner_password_fileNoAbsolute path to an exact UTF-8 password file; contents, BOM and final newline are not trimmed. Never put the password itself into arguments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: passwords are read from files and never appear in arguments/results, permission flags are advisory and viewer-dependent, and the output is reopened/decrypted for verification. This is exactly the operational context an agent needs for a non-readonly, non-idempotent tool.

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?

Front-loads the core operation, then adds only high-value constraints about passwords, permissions, and verification. Dense but every sentence earns its place.

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?

Covers the critical encryption, password handling, permission, and verification behavior for a complex tool with no output schema. It could still state what a successful call returns or how existing output files are handled, but the gaps are minor.

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

Parameters5/5

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

With only 50% schema description coverage, the description compensates by explaining revision 6 AES-256 vs revision 4 AES-128, the password-file indirection, and the advisory nature of the print/copy/change flags. The path parameters are already well described in the schema.

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 operation (encrypt) on a specific resource (PDF), with supported revisions and explicit scope (unencrypted or blank-open-password PDFs). This clearly distinguishes it from encryption-adjacent siblings such as abox_pdf_unlock even though no sibling is named.

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 usage context by limiting input to unencrypted or blank-open-password PDFs and ruling out password guessing. It does not explicitly name alternatives such as abox_pdf_unlock or say when not to use it, so it falls short of full when/when-not guidance.

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