get_file_metadata
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
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||