Skip to main content
Glama

gdrive_read_file

Read file contents from Google Drive, including Docs, Sheets, PDFs, and text files. Specify file name or ID to retrieve content as text or CSV.

Instructions

Read the contents of a file from Google Drive.

Supports:

  • Google Docs (exported as plain text)

  • Google Sheets (exported as CSV)

  • PDFs (text extracted)

  • Text files (.txt, .md, .csv, .json, etc.)

Args: file_name: Name of the file to read (e.g., "My Document" or "report.pdf") max_chars: Maximum characters to return (default: 100000) file_id: Optional stable file ID from gdrive_search (preferred when known)

Discovery: use gdrive_search, gdrive_list_folder, or gdrive_list_folder_recursive first to find the exact file_name or file_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idNo
file_nameNo
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description must fully disclose behavior. It does mention format support and export behavior (e.g., Google Docs exported as plain text, Sheets as CSV), which is useful. However, it does not disclose potential edge cases like file size limits, truncation behavior beyond max_chars, authentication requirements, or error handling when a file is not found. These gaps mean the description carries only partial behavioral transparency.

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 description is structured with bullet points for supported formats and a clear 'Args' section, making it easy to scan. It front-loads the purpose and then provides details. It is slightly longer than necessary but every section adds value; there is no fluff. The organization is logical and efficient, though not as terse as a two-sentence example.

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

Completeness4/5

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

Given that an output schema exists, the description does not need to explain return values. It covers the tool's core function, supported file types, parameters, and discovery workflow. It could be improved by mentioning failure modes or limitations (e.g., what happens if the file is too large), but overall it is sufficiently complete for an agent to call the tool correctly in most scenarios.

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

Parameters5/5

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

Since the schema has 0% description coverage, the description must compensate. It does so thoroughly in the 'Args' section: it explains file_name with an example, max_chars with a default, and file_id as an optional stable ID with a preference note. It also clarifies the relationship between file_name and file_id. This adds significant meaning beyond the bare schema and fully addresses all three parameters.

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 the action: 'Read the contents of a file from Google Drive' and lists supported formats (Google Docs, Sheets, PDFs, text files). This is a specific verb+resource, and it distinguishes itself from sibling tools like onedrive_read_file by specifying the Google Drive context. It also names related discovery tools, further clarifying its role.

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

Usage Guidelines4/5

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

The description explicitly advises using discovery tools (gdrive_search, gdrive_list_folder, or gdrive_list_folder_recursive) first to locate the file, and it notes that file_id is 'preferred when known'. This gives clear context on when to use the tool, though it does not explicitly state when not to use it or alternative tools beyond discovery. Still, the guidance is practical and actionable.

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