Search Drive Files
drive_search_filesSearch Google Drive by file name or content, filter by document type, and get results with metadata. Supports pagination for large result sets.
Instructions
Search for files in your Google Drive by name or content.
Args:
query (string): Search query - searches file names and content
page_size (number): Max files to return, 1-100 (default: 20)
page_token (string, optional): Pagination token for next page
mime_type ('all' | 'documents' | 'spreadsheets' | 'presentations' | 'folders'): Filter by type (default: 'all')
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: For JSON format: { "files": [ { "id": string, "name": string, "mimeType": string, "createdTime": string, "modifiedTime": string, "size": string, "webViewLink": string, "owners": string[] } ], "next_page_token": string | null }
Examples:
Search by name: query="budget 2024"
Search spreadsheets: query="sales", mime_type="spreadsheets"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query - searches file names and content | |
| mime_type | No | Filter by file type | all |
| page_size | No | Maximum number of files to return (1-100) | |
| page_token | No | Token for pagination to retrieve the next page of results | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |