upload_pdf_to_gemini
Fetches a PDF from a URL, renders its pages as images, and uploads them to Google Gemini for visual analysis of charts, diagrams, tables, and layouts using your custom prompt.
Instructions
Fetches a PDF from a URL, renders it as images, and uploads to Google Gemini for advanced visual processing and analysis with a custom prompt. Gemini can analyze charts, diagrams, tables, handwriting, and complex visual layouts that traditional text extraction might miss. Requires GOOGLE_API_KEY or GEMINI_API_KEY environment variable. Best for visually complex documents, forms, presentations, or documents with mixed content.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"prompt": "<prompt>"
},
"name": "upload_pdf_to_gemini"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | DPI for image rendering (72-300, default 150) | |
| url | Yes | URL of the PDF to fetch and upload to Gemini | |
| model | No | Gemini model to use for visual processing | gemini-3-pro |
| pages | No | Specific page numbers to upload (optional) | |
| prompt | Yes | Prompt to send to Gemini for analyzing the PDF. Describe what you want to extract or understand from the document. | |
| maxPages | No | Maximum number of pages to upload to Gemini (1-50, default 20) |