Decrypt a PDF
decrypt_pdfDecrypt password-protected PDFs with a user or owner password and receive an unencrypted copy. Note that the page tree is rebuilt, so digital signatures and AcroForm fields are not preserved.
Instructions
Emit an UNENCRYPTED copy of an encrypted PDF (RC4 V1–V4, AES-128, AES-256) given password (user or owner; empty user password needs none). CAVEAT: the page tree is rebuilt — signatures and AcroForm are DROPPED. To merely READ an encrypted PDF pass password to inspect_pdf / extract_text / extract_attachments / read_form_fields instead. Never cached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | Password to open the encrypted source (user or owner). Omit only for documents with an empty user password. | |
| pdfBase64 | Yes | Base64-encoded encrypted PDF to decrypt. NOTE: signatures and AcroForm are dropped (page-tree rebuild). | |
| outputMode | No | 'base64' (default) returns the PDF inline; 'file' writes it inside the PDFNATIVE_MCP_OUTPUT_DIR sandbox (SECURITY_VIOLATION when the sandbox is not configured). | base64 |
| outputPath | No | Required when outputMode='file'. Relative path inside the sandbox; must end with .pdf. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| summary | No | Tool-specific summary, when produced. | |
| filePath | No | Sandboxed absolute path (file mode). | |
| sizeBytes | Yes | ||
| diagnostics | No | PDF/A diagnostics (when includeDiagnostics=true). |