uploadFile
Uploads a local file to Google Drive, auto-detects its MIME type, and returns the Drive file ID and URL for access or sharing.
Instructions
Uploads a local file from the filesystem to Google Drive. Auto-detects MIME type from file extension. Returns the uploaded file's Drive ID and URL.
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": {
"localPath": "<localPath>"
},
"name": "uploadFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Custom name for the file in Drive. If not provided, uses the local filename. | |
| mimeType | No | MIME type override. If not provided, auto-detected from file extension. | |
| localPath | Yes | Absolute path to the local file to upload. | |
| parentFolderId | No | ID of the Drive folder to upload into. If not provided, uploads to the root of My Drive. |