View PDF
view_pdfDisplay an already-uploaded PDF in an interactive viewer widget.
Call this after delete_pdf_page, set_password, change_password, redact_pii, and redact_by_text_range to show the updated PDF. Also call when the user explicitly asks to (re-)display a specific PDF.
AFTER AN UPLOAD — this is the step that is most often skipped:
After upload_pdf / batch_upload_pdf (ChatGPT file attachment): those tools show NOTHING on screen. If the user asked to see, open, view, read, or display the document, you MUST call view_pdf now — the upload alone does not display it.
After create_upload_page (widget upload): do NOT call view_pdf. That widget renders the PDF itself.
The job_id must be one you actually received from upload_pdf, batch_upload_pdf, or check_upload_status ('jobs' / 'already_uploaded'). NEVER invent a job_id and never pass a filename as job_id. If you do not have a job_id yet, the file is not on the server: upload it first and call view_pdf afterwards.
MANDATORY after this tool returns:
Render a markdown download link so the user can save the file: Download {filename}
Follow cta_instruction and append cta_text at the end of your reply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | No | Job ID of the PDF to display (use the latest job_id). | |
| session_id | No | Session ID that the job belongs to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| status | Yes | ||
| pdf_url | Yes | ||
| cta_text | Yes | ||
| filename | Yes | ||
| reply_note | Yes | ||
| session_id | Yes | ||
| download_url | Yes | ||
| instructions | Yes | ||
| schema_version | Yes | ||
| cta_instruction | Yes |