list_files
Lists files in a Google Drive folder and optionally filters by MIME type, helping users locate documents, spreadsheets, or folders by type.
Instructions
List files in a Google Drive folder, optionally filtered by MIME type.
For a spreadsheet-only listing, list_spreadsheets(folder_id) is a narrower convenience wrapper around this same call pre-filtered to the spreadsheet MIME type.
Args: folder_id: The Google Drive folder ID to list files from. mime_type: Optional MIME type filter. Common values: 'application/vnd.google-apps.document' (Google Docs) 'application/vnd.google-apps.spreadsheet' (Google Sheets) 'application/vnd.google-apps.folder' (folders) max_results: Maximum number of results to return (default 100, max 1000)
Returns: List of files with their ID, name, MIME type, modified time, web link, starred status, and md5_checksum. md5_checksum is only present for binary files — Google Workspace files (Docs, Sheets, Slides, etc.) have no fixed byte content and the Drive API omits the field for them, so it's None for those. 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). Results are cached; call refresh_cache(folder_id=folder_id) to invalidate, or refresh_cache() to clear all caches.
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": {
"folder_id": "<folder_id>"
},
"name": "list_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | ||
| mime_type | No | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |