Upload Document
upload_documentUpload a PDF via URL or base64 bytes to create a document_id for subsequent parsing, extraction, Q&A, and viewing.
Instructions
Upload a PDF from a lawfully-reachable URL or base64 PDF bytes for Gemini Flash VLM extraction when later okraPDF tool calls need a document_id for SQL/search/docs.read, render_ui, view_document/review_extraction, parsed-node verification, or workflow runs. URL ingest is corpus-gated (see internal/content-rights-policy.md): open/public-record sources or docs the user has rights to — not paywalled/license-gated. For such URLs, prefer resolve_pdf_url so the D1 URL registry can reuse prior ingests. If you only need to read or understand PDF content for reasoning, use normal web_fetch/browser reading first; for arXiv papers, prefer arxiv.org/html/... when available. Do not use this for "verify", "cite", "prove", "source", or "where in the PDF" requests; call verify_source directly with pdf_url + page/pages instead. Opens a live document viewer immediately; the app polls status, page images, and extracted blocks as they arrive. Set wait=true only for legacy blocking status behavior.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Lawfully-reachable URL of the PDF (open/public-record source or a doc you have the rights to; not behind a paywall/login). License-gated sources are refused. | |
| data | No | Base64-encoded PDF bytes. MCP-only fallback when no public URL or normal multipart upload handoff exists. | |
| wait | No | Legacy blocking mode. Defaults to false so the MCP App opens immediately and polls live document state. | |
| file_name | No | Filename for base64 uploads. Defaults to document.pdf | |
| processor | No | OCR processor/vendor id. Defaults to "gemini-vision", the shared Gemini Flash VLM parser used by /v1/parse. Advanced legacy values include "textlayer", "unstructured", "azure-di", and "parse-proxy". | |
| document_id | No | Custom document ID (auto-generated if omitted) | |
| page_images | No | Page image rendering strategy. 'none' = no rendering; 'cover' = page 1 only; 'eager' = ALL pages rendered at upload via the PdfRasterizer Container (default). 'lazy' is a deprecated alias for 'eager'. | eager |
| vendor_options | No | Vendor-specific options passed through to the selected parsing vendor (AI SDK providerOptions pattern). |