decrypt_pdf_with_password
ChatGPTUse this when the user wants to unlock a password-protected PDF and remove its encryption. The user must supply the correct user/owner password. Outputs an unprotected PDF and returns a direct download URL — you MUST include this URL verbatim in your reply (do not paraphrase as "download from widget"). How to provide the source PDF (in priority order): 1. pdfFile — PDF attached by the user in the chat. ChatGPT auto-populates this; prefer it on the first call. 2. fileId — server-side ID returned by a previous tool call. 3. fileData + fileName — base64 payload (used by the widget). Do NOT use when: - The user wants to ADD a password — use encrypt_pdf_with_password instead. - The password is unknown to the user — this tool requires the correct password; do not attempt to brute-force or guess. - The PDF only has owner-permissions (no user password) — use edit_pdf_with_prompt with operationType add_permissions to manage those.
edit_pdf_with_prompt
ChatGPTUse this when the user wants to perform a structural PDF operation: rotate, delete, reorder, extract, duplicate, insert blank pages, resize, scale, add page numbers, compress, convert to grayscale, remove images, add permissions, or remove metadata. Returns a direct download URL — you MUST include this URL verbatim in your reply (do not paraphrase as "download from widget"). How to provide the source PDF (in priority order): 1. pdfFile — PDF attached by the user in the chat. Prefer this on the FIRST operation. 2. fileId — server-side ID returned by a previous tool call. Use this for chained operations (rotate → compress → ...) so the same document is mutated step by step. Operations and the parameters they need: - rotate: pages, angle (90 | 180 | 270). Example: "rotate page 2 by 90°". - delete: pages. Example: "delete pages 2,4,5". - reorder: newOrder (array containing every page number exactly once, NOT the pages field). Example: 3-page PDF reordered as [3,1,2]. - extract: pages. Example: "extract pages 1-5". - duplicate: pages, optional position (after). - insert_blank: optional position (1-based, omit to append), optional size (A3/A4/A5/A6/B4/B5/Letter/Legal/Tabloid or "WIDTHxHEIGHT" in points). - resize: pages, size (same vocabulary as insert_blank). - scale: pages, factor (percentage; 150 = 1.5×). - add_page_numbers: pages, format ("{n}", "Page {n} of {total}", etc.), optional position (top-center | bottom-center | bottom-right), fontSize, color. - compress: quality (screen | ebook | printer | prepress). Affects entire document. - grayscale: no extra params. - remove_images: no extra params. - add_permissions: permissions object { password, print, modify, extract }. - remove_metadata: no extra params. pages accepts: comma-separated ("1,3,5"), range ("1-5"), single page ("3"), or "all". Do NOT use when: - The user just wants to view or annotate the PDF visually — use open_pdf_editor. - The user wants to set or remove a master password — use encrypt_pdf_with_password / decrypt_pdf_with_password (this tool's add_permissions is for owner-level restrictions, not for protecting access). - The user asks for an operation outside the supported list above (e.g. OCR, form filling, redaction) — those are not implemented here. Note: this operation REPLACES the PDF stored under fileId with the result, so destructive ops (delete, remove_images, remove_metadata) are irreversible without re-uploading the original.
encrypt_pdf_with_password
ChatGPTUse this when the user wants to password-protect a PDF, add encryption, or restrict actions on it (printing, copying, editing). Outputs a new encrypted PDF and returns a direct download URL — you MUST include this URL verbatim in your reply (do not paraphrase as "download from widget"). How to provide the source PDF (in priority order): 1. pdfFile — PDF attached by the user in the chat. ChatGPT auto-populates this; prefer it on the first call. 2. fileId — server-side ID returned by a previous tool call (use for chaining). 3. fileData + fileName — base64 payload (used by the widget when it has the bytes locally). Defaults: 256-bit AES, all permissions allowed unless restrictions are specified. The original PDF is preserved (a new file is created with suffix _encrypted.pdf). Do NOT use when: - The user wants to remove a password — use decrypt_pdf_with_password instead. - The user wants to add a digital signature or watermark — use the editor (open_pdf_editor) for those. - No password is provided in the request — ask the user for one first instead of guessing.
export_file_from_widget
ChatGPTInternal tool — invoked only by the PDF Editor widget when the user clicks Save/Export. Stores a base64 payload from the widget into the server's fileStore so it can be downloaded via /download/<fileId>. Not for GPT use; this tool is hidden from the model via openai/visibility=private.
open_pdf_editor
ChatGPTUse this when the user wants to open the visual PDF editor — to view a PDF, draw/highlight/annotate, or visually inspect the result of a previous edit. When a PDF is attached to the chat, ChatGPT will auto-populate pdfFile and the editor opens with the PDF already loaded. When chaining after another tool (e.g. edit_pdf_with_prompt), pass the returned fileId to display the result. Otherwise the editor opens empty and the user can upload via the widget. Do NOT use when: - The user is asking conceptual questions about PDFs (do not open a widget for FAQ-style queries). - The user wants a server-side operation (encrypt, decrypt, rotate, compress, etc.) — call the matching tool directly; opening the editor first is unnecessary. - The user is asking about the tool's JSON schema or capabilities. Editor capabilities exposed inside the widget: text/draw/highlight annotations, redaction, signatures, watermarks, page management (merge/split/delete/extract/rotate/reorder), and export (PDF/PNG/JPG/TXT).