Problem
drive.downloadFile deliberately refuses Google Workspace files and redirects the model to docs.getText / sheets.getText / slides.getText:
This is a Google Doc. Direct download is not supported. Please use the 'docs.getText' tool...
That covers reading the content, but there is no way to produce the artifact users actually ask for: "save this doc as PDF", "export the spreadsheet as xlsx", "give me the deck as pptx". Today the model has to tell the user to do it manually in the UI.
Proposal
drive.exportFile(fileId, format, localPath) — a thin wrapper over files.export:
format: friendly enum (pdf, docx, xlsx, pptx, csv, txt, html, rtf, epub) mapped to the export MIME types, validated against the source file type by the API itself
localPath: same absolute-path convention as drive.downloadFile / slides.getSlideThumbnail
- Read-only (
readOnlyHint), fits the drive.read feature group; drive.readonly scope already covers files.export, so no consent change
Complements drive.downloadFile exactly where it punts today, and benefits Docs, Sheets and Slides at once.
I have a working implementation with Jest coverage ready to submit as a PR.
Problem
drive.downloadFiledeliberately refuses Google Workspace files and redirects the model todocs.getText/sheets.getText/slides.getText:That covers reading the content, but there is no way to produce the artifact users actually ask for: "save this doc as PDF", "export the spreadsheet as xlsx", "give me the deck as pptx". Today the model has to tell the user to do it manually in the UI.
Proposal
drive.exportFile(fileId, format, localPath)— a thin wrapper overfiles.export:format: friendly enum (pdf,docx,xlsx,pptx,csv,txt,html,rtf,epub) mapped to the export MIME types, validated against the source file type by the API itselflocalPath: same absolute-path convention asdrive.downloadFile/slides.getSlideThumbnailreadOnlyHint), fits thedrive.readfeature group;drive.readonlyscope already coversfiles.export, so no consent changeComplements
drive.downloadFileexactly where it punts today, and benefits Docs, Sheets and Slides at once.I have a working implementation with Jest coverage ready to submit as a PR.