encrypt_pdf
Add a password to a PDF to restrict opening and control printing, copying, or editing, with optional AES-256 encryption and support for already-encrypted files.
Instructions
Add a password to a PDF.
user_password opens the file; owner_password (defaults to it) controls permissions. algorithm: AES-256 (default), AES-128, RC4-128, RC4-40. allow_print/copy/modify set viewer-enforced restrictions. Use current_password if the input is already encrypted; re-encrypting a PDF that restricts anything needs its owner password (new permissions would lift the old ones). Signed PDFs are refused.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
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": {
"input_path": "<input_path>",
"user_password": "<user_password>"
},
"name": "encrypt_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algorithm | No | AES-256 | |
| overwrite | No | ||
| allow_copy | No | ||
| input_path | Yes | ||
| allow_print | No | ||
| output_path | No | ||
| allow_modify | No | ||
| user_password | Yes | ||
| owner_password | No | ||
| current_password | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| output | Yes | ||
| algorithm | Yes |