get_drive_file_content
Retrieves a Google Drive file's content by ID, returning plain text with metadata. Exports Docs, Sheets, and Slides as text or CSV, parses Office files, and decodes other formats, including shared drive files.
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. • Any other file → downloaded; tries UTF-8 decode, else notes binary.
Args: user_google_email: The user's Google email address. file_id: Drive file ID.
Returns: str: The file content as plain text with metadata header.
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": {
"user_google_email": "<user_google_email>",
"file_id": "<file_id>"
},
"name": "get_drive_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| user_google_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |