Interactive UI for PDF page operations: delete, reorder, rotate, combine, and split with visual page selection.
Input rule:
- Provide
input_assets as an array. Each item can be a FileParam object ({file_id, download_url}) or a URN/HTTPS URL string.
- Do NOT pass local paths like /mnt/data.
When the user attached PDFs via the ChatGPT native picker, pass the FileParam objects in the input_assets array (openai/fileParams points to input_assets).
Check chat context for existing PDFs first. If none, invoke "document_upload" before proceeding. Before invoking this tool for any organize operation, you must determine whether PDF properties are required to correctly work on the active query, such as page count, page ranges, file size, or any other structural information that affects how pages should be organized, rendered, or transformed. If any part of the operation depends on such properties, you must first call the "pdf_properties" tool. After invoking "pdf_properties", you must carefully inspect and evaluate the returned metadata (e.g., total pages, page dimensions, file size, rotation, page labels, etc.).Based on this evaluated metadata, you must construct the exact and validated arguments for this pdf_page_organize tool specifically the right user_intent and organize_params. Use this tool when:
- User needs VISUAL/INTERACTIVE page selection for any operation
- Requests lack specific parameters (e.g., "delete some pages", "organize my PDF", "merge PDFs")
- Delete: User wants to remove pages but doesn't specify which ones (e.g., "delete blank pages", "remove unnecessary pages")
- Reorder: User wants to rearrange pages without exact sequence (e.g., "reorganize pages", "change page order")
- Rotate: User wants to rotate pages without specifying exact pages/angles (e.g., "fix orientation", "rotate some pages")
- Combine: ALWAYS DEFAULT for ALL combine requests after document_upload. Use this unless user explicitly states exact file order like "combine file1 THEN file2 THEN file3, all pages" (e.g., "combine PDFs", "merge files", "combine these documents", "merge uploaded files", or ANY case where file order is not explicitly specified by user)
- Split: Request is vague without specific split method (e.g., "split this PDF", "divide into parts")
Use direct tools instead when:
- pdf_delete_pages: Exact page numbers provided (e.g., "delete pages 1,3,5")
- pdf_reorder_pages: Exact sequence specified (e.g., "reorder as 3,1,2")
- pdf_rotate_pages: Exact pages and angles given (e.g., "rotate page 1 by 90 degrees")
- pdf_combine: EXTREMELY RARE
- ONLY when user explicitly states exact file sequence like "combine file1.pdf THEN file2.pdf THEN file3.pdf, all pages from each". NEVER use if you would need to guess, assume, or infer the order
- pdf_split: Specific split options given (file_count, page_count, or page_ranges)
Capabilities ------------
- pdf_delete_pages
- Remove specific pages from PDF
- pdf_reorder_pages
- Rearrange page order in PDF
- pdf_rotate_pages
- Rotate pages by 90, 180, or 270 degrees
- pdf_combine
- Merge multiple PDF files into one
- pdf_split
- Split PDF into multiple files
- pdf_redact
- Search and highlight text for redaction preview
Parameters ---------- input_assets:
- Required
- Array of PDF assets. Each entry can be a FileParam object (with file_id
and download_url) or a URN/HTTPS URL string.
- IMPORTANT
- Do NOT pass local paths like /mnt/data. For native uploads, pass FileParam
objects in the input_assets array. organize_params:
- Optional
- Operation-specific parameters to pre-fill in the UI
- For user_intent=pdf_rotate_pages, pass rotation parameters as JSON object with page_rotations
array
- Example for rotate - page_rotations array containing angle (ANGLE_90/ANGLE_180/ANGLE_270)
and pages array with start/end integers
- For user_intent=pdf_combine, pass page ranges as JSON object with pageRanges array
- Example for combine - pageRanges array of arrays, one per asset - first asset pages
1-2, second asset all pages
- For user_intent=pdf_delete_pages, pass page ranges as JSON object with page_ranges
string
- Example for delete - page_ranges as comma-separated string like 1,3,5 or 2-4,6,9-12
- Do NOT pass page ranges as start/end objects - delete only accepts a comma-separated
string like 1,3-5,10
- For user_intent=pdf_reorder_pages, pass page sequence as JSON object with page_sequence
string
- Example for reorder - page_sequence as comma-separated string like 3,1,2 or 5,2,1,4,3
- Do NOT pass page sequence as start/end objects or arrays - reorder requires a comma-separated
string like 3,1,2
- For user_intent=pdf_split, pass split option as JSON object with split_option JSON
string
- Example for split - split_option as JSON string containing file_count, page_count,
or page_ranges strategy
- Do NOT pass split options as start/end objects - wrap options in the JSON string
value
- Note
- Assets are passed separately via the assets parameter, not duplicated in
organize_params
- If provided, the UI will pre-fill these values but still allow user to modify them
redactable_strings:
- Optional
- Only used with user_intent=pdf_redact
- List of words/phrases to search and highlight in the PDF
- Example - password, SSN, confidential
- UI will search for these strings and highlight all matches for user review
user_intent:
- Required
- Specifies the operation type. Supported values pdf_delete_pages, pdf_reorder_pages,
pdf_rotate_pages, pdf_combine, pdf_split, pdf_redact
- pdf_delete_pages
- Remove pages
- pdf_reorder_pages
- Rearrange page order
- pdf_rotate_pages
- Rotate pages
- pdf_combine
- Merge PDFs (especially for selective/partial page combinations)
- pdf_split
- Divide PDF into multiple files
- pdf_redact
- Search and highlight text for redaction
Output ------
- JSON configuration with operation definitions
- UI hints for rendering the interface
- Parameter specifications for each operation
- Links to corresponding tool names
- user_intent field indicating the intended operation
Examples --------
- Use Case: User wants to delete/reorder/rotate pages without specific details
Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d user_intent: pdf_delete_pages
- Use Case: Rotate pages (native picker upload) - user attached PDF via ChatGPT picker
Parameters: input_assets:
download_url: https://example.com/download/file_abc123 file_name: input.pdf mime_type: application/pdf user_intent: pdf_rotate_pages
- Use Case: Combine PDFs with native picker uploads (multi-file)
Parameters: input_assets:
download_url: https://example.com/download/file_abc123
download_url: https://example.com/download/file_def456 user_intent: pdf_combine
- Use Case: Rotate pages with pre-filled parameters
Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d user_intent: pdf_rotate_pages organize_params: page_rotations:
pages:
end: 3
- Use Case: Combine PDFs with pre-filled parameters
Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d, urn:aaid:sc:AP:f6e5d4c3-b2a1-4f9e-8d7c-6b5a4f3e2d1c user_intent: pdf_combine organize_params: pageRanges:
end: 2
- []
- Use Case: DEFAULT
- User says "combine these PDFs" or "merge files" after upload
(file order not explicitly stated) Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d, urn:aaid:sc:AP:f6e5d4c3-b2a1-4f9e-8d7c-6b5a4f3e2d1c user_intent: pdf_combine
- Use Case: User says "combine PDFs" without specifying exact order
- ALWAYS use organize
UI Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d, urn:aaid:sc:AP:f6e5d4c3-b2a1-4f9e-8d7c-6b5a4f3e2d1c user_intent: pdf_combine
- Use Case: User wants to redact specific words without exact coordinates
Parameters: input_assets: urn:aaid:sc:AP:a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d user_intent: pdf_redact redactable_strings:
- password
- SSN
- confidential