Protect or unlock a PDF
protect_pdfProtect 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
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL of a PDF. Private and local addresses are refused. Provide data or url. | |
| data | No | PDF bytes as base64 or a data URI. Decoded size is capped at 10 MB. Provide data or url. | |
| action | No | protect | |
| filename | No | ||
| mimeType | No | ||
| password | No | User password. Required to protect or unlock. Unlock only works when this is the known password. | |
| permissions | No | ||
| ownerPassword | No | Owner password. Blank uses the user password. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | PDF bytes as base64. | |
| bytes | Yes | ||
| encrypted | Yes |