search_drive_files
Search for files and folders in Google Drive using specific queries, including shared drives. Retrieve file details like ID, name, type, size, modified time, and link with configurable parameters for page size and drive scope.
Instructions
Searches for files and folders within a user's Google Drive, including shared drives.
Args:
user_google_email (str): The user's Google email address. Required.
query (str): The search query string. Supports Google Drive search operators.
page_size (int): The maximum number of files to return. Defaults to 10.
drive_id (Optional[str]): ID of the shared drive to search. If None, behavior depends on corpora
and include_items_from_all_drives
.
include_items_from_all_drives (bool): Whether shared drive items should be included in results. Defaults to True. This is effective when not specifying a drive_id
.
corpora (Optional[str]): Bodies of items to query (e.g., 'user', 'domain', 'drive', 'allDrives').
If 'drive_id' is specified and 'corpora' is None, it defaults to 'drive'.
Otherwise, Drive API default behavior applies. Prefer 'user' or 'drive' over 'allDrives' for efficiency.
Returns: str: A formatted list of found files/folders with their details (ID, name, type, size, modified time, link).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
corpora | No | ||
drive_id | No | ||
include_items_from_all_drives | No | ||
page_size | No | ||
query | Yes | ||
user_google_email | Yes |