Skip to main content
Glama

readDriveFile

Read any Google Drive file by ID, auto-detect its type (Doc, Sheet, Word, PDF), route to the correct reader, and return content plus metadata—even when the file type is unknown.

Instructions

Unified read tool: accepts any Google Drive file ID, auto-detects the file type (Google Doc, Sheet, Word .docx, PDF), and routes to the appropriate reader. Returns content along with metadata about available capabilities. Use this when you have a file ID but don't know the file type, or when readDocument fails with a 400 error.

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": "readDriveFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeNoA1 notation range for Google Sheets (e.g., 'Sheet1!A1:C10'). Required for spreadsheets.
fileIdYesThe Google Drive file ID (the long string between /d/ and /edit in a Drive URL).
formatNoOutput format for Google Docs: 'markdown' (default, preserves rich text/paragraph formatting with a small HTML allowlist), 'text' (plain text), 'json' (raw structure). Ignored for non-Doc files.markdown
plainMarkdownNoFor Google Docs markdown output only. If true, suppresses rich HTML-style formatting extensions and returns cleaner portable markdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool auto-detects and routes by type and returns content plus metadata about available capabilities, but says nothing about permissions/auth, size limits, how binary formats like PDF are extracted, or what the 400-fallback actually changes. The routing behavior is a real addition; the operational gaps keep it at adequate rather than strong.

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?

Two sentences, front-loaded with what the tool does, followed immediately by the selection rule. Every clause carries information; there is no restatement of the name or filler.

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?

There is no output schema, but the description states the return shape (content plus capability metadata) and the parameters are fully schema-documented, so an agent has what it needs to invoke it. It falls short only on failure-mode detail, such as what happens when detection is ambiguous or a format is unsupported.

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 fileId, range, format, and plainMarkdown are all documented in the schema with examples and defaults. The description adds no parameter-level meaning beyond the schema and does not tie the 'auto-detect' behavior to how range or format interact with the detected type. Baseline 3 applies.

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 opens with a specific verb and resource ('Unified read tool' accepting any Drive file ID) and explains the mechanism: auto-detect file type and route to the appropriate reader. It explicitly separates itself from readDocument by naming the case it handles better, so an agent can choose without inspecting either schema.

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

Usage Guidelines5/5

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

It gives two concrete selection triggers — you have a file ID but don't know the type, or readDocument fails with a 400 — and names the sibling alternative explicitly. This is an unambiguous when-to-use rule rather than an implied one.

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