Skip to main content
Glama

Benchline

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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
dataYesPDF bytes as base64.
bytesYes
encryptedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint), so the description's added context of AES-256 and the permission surface is useful but overlaps the schema's permissions object. It never states what happens on a wrong password, on an already-protected input, or how owner vs. user password interact at runtime.

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?

Five short, front-loaded sentences with no filler; the mode decision and encryption level come first. Two sentences (permission enumeration, "Private addresses are refused") restate what the schema already declares, so it falls short of fully waste-free.

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 an 8-parameter tool with a nested permissions object and an enum, the description covers the decision logic, credential requirements, input modalities, and the permission surface. Missing edge-case behavior (wrong password, already-protected input) is the main residual gap; return values are covered by the output schema.

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?

Schema coverage is only 50%, so the description must compensate, and it does: it explains action values, that password is the user password, that ownerPassword is optional, and summarizes the permission set. Only filename and mimeType go unexplained, which are largely self-evident.

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 specific verbs and resource ("Protect a PDF with AES-256, or unlock one"), names the algorithm, and makes the protect-vs-unlock branch explicit, which cleanly separates it from siblings like compress_pdf, merge_pdf, or split_pdf that also take PDF input.

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 context for each mode and an explicit boundary: unlock "only works when the password is known," which tells the agent this is not a cracking tool. It does not name competing siblings (e.g., compress_pdf for size reduction), so 4 rather than 5.

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