Skip to main content
Glama

get_file_metadata

Read-only

Retrieves metadata for any Google Drive file or folder by ID, including name, type, owners, timestamps, trashed/starred status, and md5 checksum to detect content drift.

Instructions

Get metadata for any file or folder in Google Drive.

Args: file_id: The Google Drive file or folder ID.

Returns: id, name, mimeType, parents, createdTime, modifiedTime, size, owners, webViewLink, trashed status, starred status, and md5_checksum. md5_checksum (like size) is only present for binary files — Google Workspace files have no fixed byte content and the Drive API omits it for them. Compare it to a local file's md5 to detect real content drift instead of inferring change from modifiedTime alone; sync_folder(use_checksum=True) does that comparison itself (see its docstring for the cases where modifiedTime misleads). starred reflects star_file/unstar_file's own effect (#388) — previously there was no way to read a file's starred state independently of calling one of those two mutating tools.

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": {
      "file_id": "<file_id>"
    },
    "name": "get_file_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses conditional behavior: md5_checksum and size are only present for binary files, Google Workspace files omit fixed byte content, and starred reflects star_file/unstar_file effects. This adds meaningful context about what the response will and will not contain.

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

Conciseness3/5

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

The description is front-loaded and uses an Args/Returns structure, but it redundantly enumerates return fields even though an output schema exists. The parenthetical issue reference and historical note add some noise rather than crisp guidance.

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?

For a simple read-only metadata tool with one parameter and an output schema, the description is nearly complete: it explains conditional return fields and the starred behavior. The main missing piece is explicit guidance on when to use this versus other read tools.

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?

With only one parameter and 0% schema description coverage, the description supplies needed semantic meaning by identifying file_id as the Google Drive file or folder ID. It fully compensates for the schema gap, though it does not provide format examples.

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 description gives a specific verb and resource: get metadata for any file or folder in Google Drive. It is clear enough to distinguish from mutation tools like star_file or upload_file, but it does not explicitly contrast itself with sibling read tools such as list_file_activity.

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 this is the read path for file metadata and provides useful context about using md5 for drift detection versus sync_folder. However, it never explicitly states when to use this tool instead of other read-oriented siblings, nor does it list exclusions or prerequisites.

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