Skip to main content
Glama

PDF Efforts

Password-protect PDF

protect_pdf
Idempotent

Encrypt a PDF with AES-256 so it needs a password to open; optionally block printing, copying or editing. The password is used once and not stored.

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": {
      "file": "<file>",
      "password": "<password>"
    },
    "name": "protect_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF to protect.
passwordYesPassword needed to open the PDF (at least 4 characters).
block_copyingNo
block_editingNo
block_printingNo

Output Schema

NameRequiredDescriptionDefault
infoNoFacts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf).
noteNoAnything the user should know about the result.
textNoExtracted text (pdf_to_text, ocr_pdf).
filesYesResult files. Download them before expires_at; pass file_id to another tool to chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the encryption standard (AES-256), the specific restrictions that can be applied, and the important assurance that the password is used once and not stored. It stops short of noting whether protection is reversible or how the password interacts with later calls.

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?

A single compact sentence pair with the encryption mechanism and result front-loaded, followed by the optional restrictions and the password-handling note. Nothing is redundant and no sentence is wasted.

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?

An output schema exists, so return values need not be explained, and the description covers the core operation, the optional permission set, and password retention. For a five-parameter mutation tool with a nested file object, it is nearly complete, missing only guidance on the alternative unlock_pdf and any note about how protection affects downstream processing.

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 description coverage is only 40%, so the description carries meaningful burden, and it does partially compensate by naming the three restriction flags (printing, copying, editing) and confirming the password's transient handling. However, it adds no detail on the file input object (url vs base64 vs file_id, or the 60-minute file_id lifetime), leaving the low-coverage parameters to the schema alone.

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

Purpose4/5

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

The description states a concrete verb and resource plus the mechanism ('Encrypt a PDF with AES-256') and the outcome ('needs a password to open'), which is far more specific than the title alone. It does not, however, distinguish itself from the obvious sibling unlock_pdf, so an agent must infer the direction of the operation.

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

Usage Guidelines3/5

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

Usage is implied by the effect description: an agent can infer this is the tool for adding password protection and permission restrictions. There is no explicit when-to-use statement, no mention of when not to use it, and no pointer to unlock_pdf as the inverse operation.

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