upload_file
Upload a single file to Gemini AI for immediate analysis. Supports documents, images, and code files with automatic processing and returns file URI for chat integration.
Instructions
UPLOAD SINGLE FILE - Standard method for uploading one file to Gemini. BEST FOR: Single documents, images, or code files for immediate analysis. Includes automatic retry and state monitoring until file is ready. WORKFLOW: 1) Upload with auto-detected MIME type, 2) Wait for processing to complete (usually 10-30 seconds), 3) Returns URI for chat tool. RETURNS: fileUri (pass to chat tool), displayName, mimeType, sizeBytes, state. Files auto-delete after 48 hours. For 2+ files, consider upload_multiple_files for efficiency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file to upload | |
| displayName | No | Optional display name for the file | |
| mimeType | No | Optional MIME type (auto-detected if not provided) |