Google Drive File/Folder Upload (Unified Auth)
upload_to_driveUpload a file or folder from your filesystem to Google Drive. Specify a target folder and optional custom filename.
Instructions
Upload a file to Google Drive. By default path is the server's local filesystem (single call, supports folders). On remote deployments where the client and server are on different machines, set DRIVE_UPLOAD_CLIENT_FS=true: path is then the client's filesystem — the first call returns a pendingUpload payload with a signed PUT URL; the client uploads bytes to that URL, then re-calls this tool with the same path to finalize the Drive upload. Folder uploads are only supported in server-FS mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Local filesystem path to the file or folder to upload (supports ~ expansion) | |
| filename | No | Custom filename for the uploaded file (optional - uses original filename if not provided) | |
| folder_id | No | Google Drive folder ID where file will be uploaded (default: 'root' for root folder) | root |
| user_google_email | No | The user's Google email address for Drive access. If None, uses the current authenticated user from FastMCP context (auto-injected by middleware). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| success | No | ||
| fileInfo | No | ||
| warnings | No | ||
| userEmail | No | ||
| filesUploaded | No | ||
| folderSummary | No | ||
| pendingUpload | No |