Skip to main content
Glama

Get Drive File Content

get_drive_file_content
Read-onlyIdempotent

Retrieve content of any Google Drive file by ID, extracting text from documents, spreadsheets, presentations, PDFs, images, and other 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. • 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user’s Google email address.
file_idYesDrive file ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds significant behavioral details: exporting native docs as text/CSV, unzipping and parsing Office files, PDF text extraction with fallbacks, base64 encoding for images, and handling for other files. This goes well beyond annotations and is complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: one opening sentence followed by clear bullet points. It is front-loaded with the main purpose and then structured logically by file type. No redundant information; every sentence earns its place. Ideal length given the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (multiple file types with different handling) and the presence of an output schema (context signals indicate it exists), the description covers all necessary cases. It explains fallbacks and edge cases (e.g., image-only PDFs) and handles all file categories. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have descriptions in the input schema (100% coverage). The description does not add any additional meaning or usage details about the parameters (e.g., how to obtain file_id or user_google_email). According to the rubric, when schema coverage is high (>80%), baseline is 3. No extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves the content of a specific Google Drive file by ID, and explicitly lists how different file types (native Google Docs, Office files, PDFs, images, others) are handled. This distinguishes it from siblings like get_doc_content (specific to Google Docs) or get_gmail_attachment_content (Gmail attachments), providing a specific verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for any Drive file and details per-type behavior, but does not explicitly state when to use this tool versus alternatives like get_doc_as_markdown, get_drive_file_download_url, or get_gmail_attachment_content. The lack of explicit when-to-use or when-not-to-use guidance lowers the score, though the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/theolefort-cyber/mcpworkspace'

If you have feedback or need assistance with the MCP directory API, please join our Discord server