start_drive_upload
Begin a direct upload of LOCAL bytes to Drive.
writeGoogle Sheets, Docs & Drive
The server returns an uploadUrl (a Google resumable session); you then PUT the file bytes DIRECTLY to that URL — the bytes never pass through the SellerSheet server. Use this for files you have on disk that are not reachable by URL (for URL sources use save_url_to_drive instead).
Call it
In an AI client (MCP)
{
"name": "start_drive_upload",
"arguments": {
"parentId": "<parentId>",
"name": "<name>"
}
}From code (Tool API)
curl -X POST https://api.sellersheetai.com/api/v1/tools/start_drive_upload \
-H "Authorization: Bearer $SELLERSHEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parentId":"<parentId>","name":"<name>"}'Early access — the Tool API is open on request, contact us.
Arguments
| Name | Type | Description |
|---|---|---|
parentIdrequired | string | Target Drive folder ID. |
namerequired | string | File name to create in Drive. |
mimeType | string | Optional MIME type OF THE BYTES YOU WILL PUT (default application/octet-stream). |
convertTo | string | Optional Google Workspace target type — Drive converts the uploaded bytes on arrival. E.g. upload an .xlsx (mimeType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') with convertTo='application/vnd.google-apps.spreadsheet' and the created file is a NATIVE Google Sheet (formulas, formats, dropdowns, notes, frozen panes preserved). When converting, your PUT request's Content-Type header must equal mimeType. |
Result
Every tool answers {notification, data, human_action}; data carries:
uploadUrl— PUT the file bytes here, e.g. `curl -X PUT -H "Content-Type: <mimeType>" --data-binary @FILE "<uploadUrl>"`.expiresInDays— Session validity (7).howTo— Recipe string. The PUT response body is the new file resource — read "id" from it to get the Drive fileId.
Example
start_drive_upload(parentId="1ABC...", name="report.pdf", mimeType="application/pdf")
# xlsx -> native Google Sheet import:
start_drive_upload(parentId="1ABC...", name="Q3 Model",
mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
convertTo="application/vnd.google-apps.spreadsheet")