Skip to main content
Glama

Read a file's contents from Drive

read_gdrive_file
Read-only

Open one file and return what is in it. Google Docs and Slides, and Word documents (.docx), come back as text; text, CSV, JSON, HTML and code files come back as themselves; images come back as pictures the assistant can look at (a large photo, or a HEIC or TIFF, is scaled down to a JPEG; images up to 25 MB); a PDF file comes back whole as a document (an embedded application/pdf resource) for the assistant to read, up to 10 MB. Spreadsheets are refused in favour of read_google_sheet_range. Get the id from list_gdrive_items or search_gdrive_items.

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": {
      "mailbox": "<mailbox>",
      "itemId": "<itemId>"
    },
    "name": "read_gdrive_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYes
mailboxYesEmail address of the connected Gmail/Google Workspace mailbox to act on. Call list_authorized_mailboxes to see available options.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only establish readOnly/non-destructive/closed-world; the description goes well beyond them with conversion rules (HEIC and TIFF scaled down to JPEG), concrete size ceilings (images up to 25 MB, PDFs up to 10 MB), and the fact that PDFs arrive as an embedded application/pdf resource. These are behavioral details an agent cannot get from the schema or annotations and that materially affect how it should handle the result.

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 output-type breakdown is front-loaded and every clause carries information (format mapping, scaling, size limits, sibling exclusion, id sourcing). The cost is that it is a single semicolon-chained run-on, which makes the size limits and the spreadsheet refusal slightly harder to scan than a short list would be.

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?

With no output schema, the description carries the full burden of describing return shape, and it does so thoroughly for every supported file type including the embedded-resource case. What is absent are failure modes an agent would want before calling: permission-denied behavior, unsupported-type handling, and whether truncation occurs for very large text files.

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

Parameters4/5

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

Schema coverage is 50%: mailbox is documented in-schema, but itemId has no description. The description compensates for itemId by telling the agent where to source the id (list_gdrive_items or search_gdrive_items) and by framing the call as targeting "one file". It adds no meaning for mailbox, but the schema already covers that parameter, including the list_authorized_mailboxes pointer.

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?

"Open one file and return what is in it" is a concrete verb+resource, and the description immediately enumerates per-mimetype outcomes (Docs/Slides/docx as text, images as viewable pictures, PDF as an embedded resource). It also explicitly excludes spreadsheets in favour of read_google_sheet_range, so an agent can distinguish it from the sibling readers without opening 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 both the positive routing ("Get the id from list_gdrive_items or search_gdrive_items") and an explicit exclusion ("Spreadsheets are refused in favour of read_google_sheet_range"). The when-not case is stated outright rather than inferred, which is exactly what a reader tool needs given the many read_* siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources