list_drive_items
List files and folders in a Google Drive folder, including shared drives. Supports pagination, filtering by file type, and ordering by various properties.
Instructions
List files in one Drive folder (children of folder_id).
Use this to browse by folder; for content-based search use search_drive_files. Scoped to a folder's direct children. If drive_id is set, folder_id is interpreted inside that shared drive. Requires the drive.readonly OAuth scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| folder_id | No | Folder ID to list. "root" = My Drive root. For a shared drive, pass the drive ID to list its root or a folder ID within it. Default "root". | root |
| page_size | No | Max items returned, 1-1000. Default 100. | |
| page_token | No | Cursor from a prior response's `nextPageToken`. | |
| drive_id | No | Shared drive ID to scope the listing. Omit for My Drive + shared-with-me. | |
| include_items_from_all_drives | No | True (default) to include shared drive items when drive_id is omitted. | |
| corpora | No | "user", "drive", or "allDrives". Defaults to "drive" when drive_id is set. | |
| file_type | No | Friendly alias ("folder", "doc", "sheet", "slides", "pdf", etc.) or raw MIME type. Filters to that type only. | |
| detailed | No | True (default) includes size, modified time, webViewLink; False returns just name/ID/type. | |
| order_by | No | Comma-separated sort keys with optional " desc", e.g. "folder,modifiedTime desc". Valid keys: createdTime, folder, modifiedByMeTime, modifiedTime, name, name_natural, quotaBytesUsed, recency, sharedWithMeTime, starred, viewedByMeTime. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |