Read File Content
read_file_contentRetrieves content from Google Drive files by ID, extracting text from documents, spreadsheets, PDFs, and images, including files in shared drives.
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 → returned as base64 with MIME metadata for multimodal clients. • Any other file → downloaded; tries UTF-8 decode, else notes binary.
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": {
"fileId": "<fileId>"
},
"name": "read_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | No | user@gmail.com | |
| fileId | Yes | Drive file ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |