Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by ChinmayNakwa

Get Drive File Content

get_drive_file_content
Read-onlyIdempotent

Retrieve a Google Drive file by ID and extract readable text, CSV, or image content from Docs, Sheets, Slides, Office files, PDFs, and images for AI use.

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 → still returned as base64 text. • 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": {
      "user_google_email": "<user_google_email>",
      "file_id": "<file_id>"
    },
    "name": "get_drive_file_content"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover safety and idempotency, but the description adds substantial behavioral detail beyond them: native Google Docs/Sheets/Slides export formats, Office-file parsing, PDF text extraction with scanned-PDF fallback, and image/SVG/binary handling. This is exactly the kind of conversion and fallback behavior an agent needs before invoking the tool.

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

Conciseness4/5

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

The definition is front-loaded with the core retrieval behavior and then organized into a useful bullet list by file type. It is somewhat long, but each bullet describes a distinct behavior that helps an agent predict what will be returned.

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?

For a file-content retrieval tool with varied output formats, the description is complete enough: it covers how different file types are processed and what happens when extraction is not possible. Since an output schema exists, it does not need to explain return values further.

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?

Schema description coverage is 100%, so both parameters are already documented in the schema. The description reinforces that the file is retrieved 'by ID,' but it adds little new meaning for file_id or user_google_email beyond the structured schema.

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

Purpose4/5

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

The first sentence clearly states a specific verb and resource: 'Retrieves the content of a specific Google Drive file by ID,' and adds shared-drive scope. It is clear what the tool does, but it does not explicitly differentiate itself from nearby siblings such as get_doc_content or get_drive_file_download_url.

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 explains supported file types and fallback behavior, which implies when the tool is useful for extracting content. However, it gives no explicit guidance on when to use this tool versus alternatives like get_doc_content, get_drive_file_download_url, or export_doc_to_pdf.

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

Deploy Server

Other Tools