search_drive_files
Search the user's Google Drive (read-only, metadata only) across all connected Google accounts and return reference links — file name, type, modified time, and webViewLink. No file contents are read. text keywords match file names AND full text; set name_only=true to match names only; filter by mime_type (aliases: folder/document/spreadsheet/presentation/pdf) and modified_after (ISO 8601). Advanced: pass raw_query to run a native Drive q expression instead. Results include shared drives and files shared with the user, sorted by modifiedTime desc, limit per account (default 10, max 50). Accounts without the Drive scope are skipped and reported in errors with a reconnect hint. Call list_accounts to learn account labels. Each call fetches ONE page only — it never walks pages automatically. A next_page_token in the response means more results exist; fetch the next page yourself by passing it back as page_token together with the SAME single accounts: [label] (paging only works narrowed to exactly one account — a cross-account search never returns a page token).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Keywords (space-separated, AND) matched against file names and full text. | |
| limit | No | Max files PER account (default 10). | |
| accounts | No | Account labels to search (see list_accounts). Omit for all Drive-enabled Google accounts. | |
| mime_type | No | Exact mimeType, or alias: folder / document / spreadsheet / presentation / pdf. | |
| name_only | No | true = match file names only (skip fullText). | |
| raw_query | No | Advanced: native Drive `q` expression — overrides the structured fields above. | |
| page_token | No | Continue from a previous call's next_page_token to fetch the next page. Only valid when `accounts` names exactly ONE account — narrow to a single account to page through its results; cross-account searches are always single-page. Never fetch pages automatically in a loop — the caller decides whether another page is needed. | |
| modified_after | No | Only files modified after this instant (ISO 8601). |