Drive Upload File
drive_upload_fileUpload a file to Google Drive from a Workspace picker or local path, create a new file, replace an existing file's content, or create an empty Google Doc, Sheet, or Slides file.
Instructions
Upload a file to Drive from the Workspace Files picker or a local path, as a new file or, with file_id, as new content of an existing file (same ID, name, folder and sharing). With neither source it creates an empty file from name and mime_type, such as a blank Google Doc in a chosen folder; for folders use drive_create_folder and to rename or set properties drive_update_file_metadata. Returns status 'ok', mode ('create', 'overwrite', 'skipped', 'replace' or 'metadata_only') and file (id, name, kind, mime_type, size, size_bytes, parent_ids, drive_id, web_url, trashed; null where not reported). Mode 'skipped' returns the same-named file that already exists.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "drive_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name to store in Drive, including any extension; omit to keep the source file's original name. Required when creating an empty file from metadata. | |
| file_id | No | Existing Drive file whose content is replaced by local_path or uploaded_file, keeping its ID, name, folder and sharing; Drive stores it as a new revision. name, parent_ids, if_exists and description are rejected with it. Omit to create a new file. | |
| if_exists | No | For a new upload, what to do when a non-trashed file with the same name exists in the target folder: 'rename' (the default) uploads a new file with a timestamp before the extension, e.g. 'report (upload 20261103-142500).pdf', 'overwrite' replaces that file's content as a new revision, 'skip' uploads nothing and returns the existing file. | |
| mime_type | No | For an upload, the content's MIME type, e.g. 'application/pdf', 'image/png' or 'text/csv'; the file is stored as-is, not converted, and omitted it is the picker's recorded type or guessed from the extension. For an empty file, its type, e.g. 'application/vnd.google-apps.document' (blank Google Doc), 'application/vnd.google-apps.spreadsheet' (blank Sheet) or 'application/vnd.google-apps.presentation' (blank Slides deck); omit to let Drive choose. | |
| resumable | No | Upload content in chunks with progress reports; false sends it in a single request. An empty file has no content to upload. | |
| local_path | No | Path of a file on the machine running the server; accepted only when the server runs locally, and rejected with picker_required over remote MCP. Give at most one of local_path or uploaded_file; omit both to create an empty file from metadata. | |
| parent_ids | No | One parent folder ID (Drive allows a single parent), or a shared drive ID for its top level; omit for the root of My Drive. The if_exists name check looks only in that folder (the root of My Drive when omitted). | |
| description | No | Description text shown in the Drive details of the new or overwritten file. | |
| uploaded_file | No | Upload ID (upl_...) of a file the user added with the Workspace Files picker (uploads_file_manager) or listed by uploads_list_files; the way to send a file over remote MCP. Give at most one of local_path or uploaded_file. | |
| keep_revision_forever | No | With file_id only: true keeps the new revision forever instead of letting Drive purge it as an old revision; applies to binary (non-Google) files only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| mode | No | ||
| reason | No | ||
| status | No | Machine-readable operation status. |