-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
Drive tools only search/list files in the user's personal "My Drive". Shared drive files are invisible. This affects drive_search, drive_list, drive_get, drive_download, and all other drive operations.
Root Cause
The Google Drive API requires two flags to access shared drive content:
IncludeItemsFromAllDrives(true)SupportsAllDrives(true)
Neither is set in the current implementation (internal/drive/drive_service.go and internal/drive/drive_tools_testable.go).
Impact
drive_searchwithfullText containsonly returns results from My Drivedrive_listcan't browse shared drive folders- Users in Google Workspace orgs (where shared drives are common) can't access most of their files
Fix
Add both flags to all Drive API calls:
// files.list (search, list)
srv.Files.List().
Q(query).
IncludeItemsFromAllDrives(true).
SupportsAllDrives(true).
// ...
// files.get
srv.Files.Get(fileId).
SupportsAllDrives(true).
// ...
// files.create, files.update, files.delete, etc.
srv.Files.Create(file).
SupportsAllDrives(true).
// ...Also consider adding a corpora parameter to drive_search to let users scope searches:
user— My Drive only (current default)allDrives— My Drive + shared drivesdrive— specific shared drive (requiresdriveId)
Default should be allDrives for the most useful behavior.
Acceptance Criteria
-
drive_searchreturns results from shared drives -
drive_listcan browse shared drive folders -
drive_get,drive_download,drive_upload,drive_move,drive_copy,drive_trash,drive_deleteall work with shared drive files -
drive_shareanddrive_get_permissionswork with shared drive files - Add optional
corporaparameter todrive_search(default:allDrives) - Update tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels