Skip to main content
Glama

Get file metadata

get_file
Read-onlyIdempotent

Fetch a file's metadata—name, type, size, timestamps, permissions, and links—without downloading content. Choose specific fields for a custom projection when you need more or fewer details.

Instructions

Returns a file's metadata (never its content — that is download_file/export_file): id, name, mimeType, size, parents, driveId, createdTime/modifiedTime, trashed, starred, description, md5Checksum, webViewLink, webContentLink, exportLinks (for Google-native files), owners, lastModifyingUser, shortcutDetails (a shortcut's real target id/mimeType) and capabilities (canEdit/canShare/canTrash/canDelete/canDownload — check before mutating). Google-native files (mimeType application/vnd.google-apps.*) report no size and no md5Checksum. Pass fields to select a custom projection (Drive fields syntax) when the default set is too much or too little.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoCustom Drive fields projection, e.g. "id,name,permissions(id,role,emailAddress)". Defaults to a rich metadata set.
file_idYesThe file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too.
Behavior5/5

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

Annotations already establish read-only/idempotent/non-destructive, so the bar is lower, but the description adds substantial behavior not in annotations: content is never returned, Google-native files lack size/md5Checksum, shortcuts expose target details, and capabilities are included for pre-mutation checks. No contradiction with annotations.

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?

Front-loaded with core purpose and content exclusion before enumerating return fields. Dense but every segment earns its place, and since there is no output schema the field list is necessary rather than filler.

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?

Given no output schema and a broad metadata surface, the description enumerates all expected fields, flags special cases (Google-native no size/md5, shortcutDetails), and routes content retrieval to named siblings. An agent has enough to invoke correctly without opening any other tool.

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 covers 100% of parameters, so baseline is 3. The description adds a bit beyond schema: it clarifies that fields uses Drive fields syntax and explains the tradeoff of the default projection, and it reinforces file_id semantics. Does not add syntax examples as much as it could, but sufficient bonus.

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?

Description states a specific verb ('Returns a file's metadata'), clearly distinguishes itself from content-fetching siblings by explicitly naming download_file/export_file, and notes Google-native metadata exceptions. Far from tautology; an agent can tell what resource and scope this tool covers.

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?

Explicitly says when not to use it ('never its content — that is download_file/export_file') and tells the agent to check capabilities before mutating, which orients it toward mutation siblings. It also advises using fields projection when the default set is too much or too little, giving a concrete selection criterion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-drive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server