feat(drive): add listDriveFiles and searchDriveFiles tools#99
Merged
a-bonus merged 1 commit intoa-bonus:mainfrom Mar 28, 2026
Merged
Conversation
Add two new MCP tools for working with all file types in Google Drive, not just Google Docs: - `listDriveFiles`: lists files across Drive with optional MIME type filter (supports shortcuts like "spreadsheet", "pdf", etc.), folder scope (folderId), ownership filter (ownedByMe / sharedWithMe), configurable orderBy field, and sort direction (asc/desc). - `searchDriveFiles`: searches Drive by name or content across all file types, with MIME type filtering, folder subtree scoping via the `ancestors` Drive query, configurable sort order, and pagination support via nextPageToken. Existing tools (listDocuments, searchDocuments) are unchanged — they remain the preferred tools for Docs-only workflows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The existing
listDocumentsandsearchDocumentstools only work with Google Docs (application/vnd.google-apps.document). There is no way to list or search Sheets, PDFs, presentations, folders, or other Drive file types from MCP.Solution
Add two new Drive tools:
listDriveFilesLists files across all of Google Drive with:
document,spreadsheet,presentation,folder,form,pdf,zip) or full MIME type stringsfolderIdownedByMe/sharedWithMeflagsorderBy(name,modifiedTime,createdTime,quotaBytesUsed) +sortDirection(asc/desc)modifiedAfterdate filtersearchDriveFilesSearches all Drive file types by name or content with:
searchIn:name|content|both'folderId' in ancestors(recursive, unlikelistFolderContents)orderBy+sortDirectionnextPageToken+hasMoreflag; acceptspageTokenfor subsequent pagesmodifiedAfterdate filterCompatibility
Existing tools (
listDocuments,searchDocuments,listFolderContents) are unchanged.