Get Drive File Content
get_drive_file_contentRetrieve and extract readable content from a Google Drive file by ID, including Docs, Sheets, Slides, Office files, PDFs, and images, so you can inspect or process file data without manual downloads.
Instructions
Retrieves the content of a specific Google Drive file by ID, supporting files in shared drives.
• Native Google Docs, Sheets, Slides → exported as text / CSV. • Office files (.docx, .xlsx, .pptx) → unzipped & parsed with std-lib to extract readable text. • PDFs → text extracted with pypdf when possible; scanned/image-only PDFs fall back to a download hint. • Images (PNG, JPEG, GIF, WebP) → returned as MCP image content after the metadata header. SVG → returned as its markup; raster images it embeds as base64 are attached as image content, numbered to match their place in the markup. BMP and TIFF → base64 text, or a download hint when over the default page size. • Any other file → downloaded; tries UTF-8 decode, else notes binary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | Character offset to read on from after a truncated result. | |
| file_id | Yes | Drive file ID. | |
| full_content | No | Return all content from offset onward in one call instead of a page of the default size. | |
| user_google_email | Yes | The user’s Google email address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |