# Google Drive — Requirements Status

Status of collab API / InternalAI Drive capabilities against the product requirements.

**Scope:** `slack-bot-service.com` collab tools (`gdrive_*`) + HelloMCP wiring.  
**Last reviewed:** 2026-08-27

---

## Summary

| # | Requirement | Status |
|---|-------------|--------|
| 1 | Search across all authorized My Drives and Shared Drives, not only selected-user samples | Partial |
| 2 | Created-after, modified-after, owner, editor, folder, MIME-type and full-text filters | Done |
| 3 | Version history, comments, permissions, sharing state and shortcuts | Done |
| 4 | Binary download/materialization for PDFs, Office files, images, audio, video and CSV | Partial |
| 5 | Structured Google Sheets reading by tab, row and column with pagination | Done |
| 6 | Approval-gated create, upload, rename, move, copy, share, unshare and archive/trash | Not done |
| 7 | Checksums or version IDs to prove which version was analyzed | Done |
| 8 | Durable Fireflies pairing based on file ID and meeting timestamp | Partial |

---

## 1. Org-wide search (My Drives + Shared Drives)

**Status: Partial**

**What works**
- Per-user search via service account + Domain-Wide Delegation.
- Covers that user’s **My Drive** and accessible **Shared Drives** (`corpora=allDrives`).
- Scopes: `my_drive`, `shared_with_me`, `shared_drives`, `starred`, `recent`, `trash`, folder children (+ optional recursive).
- Org-oriented helpers: owner-index lookup, drive overview, workspaces list.

**Gaps**
- Not a single live crawl of **every** authorized user’s My Drive.
- Org-wide title/mime often relies on the **owner index** / sampling, not a full real-time fan-out across all users.

**Tools:** `gdrive_search_files`, `gdrive_lookup_owned_file`, `gdrive_drive_overview`, `gdrive_list_workspaces`, `gdrive_user_drive_info`

---

## 2. Filters (created / modified / owner / editor / folder / MIME / full-text)

**Status: Done**

| Filter | Args / behavior |
|--------|-----------------|
| Created-after | `created_after` (ISO date/datetime) |
| Modified-after | `modified_after` |
| Owner | `owned_by` / `owner` / natural language (“owned by …”) |
| Editor | `modified_by` / “last edited by …” (+ optional `include_editors`) |
| Folder | `folder_id`, `folder_name`, recursive + depth limits |
| MIME type | `mime_type` shorthand (`pdf`, `video`, `sheet`, …) or raw MIME |
| Full-text | `query` → Drive `fullText contains '…'` |

**Tool:** `gdrive_search_files`

---

## 3. Versions, comments, permissions, sharing, shortcuts

**Status: Done**

| Capability | Tool / fields |
|------------|----------------|
| Version history | `gdrive_list_revisions` |
| Comments | `gdrive_list_comments` (may need extra Drive comments scope) |
| Permissions / sharing | `gdrive_list_permissions`; search/read include `shared` and sharing user |
| Shortcuts | `shortcut_target_id`, `shortcut_target_mime_type` on search/read |

---

## 4. Binary download / materialization

**Status: Partial**

**What works**
- `gdrive_read_file` export/download path with byte window pagination (`offset` / `next_offset`).
- Google Docs / Sheets / Slides exported to text-friendly formats.
- **PDF** text extraction.
- Office types exported where Drive export APIs allow.
- CSV / sheet tab content via read + query tools.
- MIME discovery for images / audio / video via search.

**Gaps**
- Not a durable binary materialization store for large **audio / video / images**.
- Media is findable and metadata-readable; full binary “download to artifact store” is not implemented as a first-class pipeline.

**Tools:** `gdrive_search_files`, `gdrive_read_file`

---

## 5. Structured Google Sheets (tab / row / column + pagination)

**Status: Done**

- Read by tab: `gdrive_read_file` + `sheet_name`.
- Structured query: `gdrive_query_sheet` (rows/columns).
- Pagination via `offset` / `next_offset` (and sheet query limits).

**Tools:** `gdrive_read_file`, `gdrive_query_sheet`

---

## 6. Approval-gated Drive writes

**Status: Not done**

Not implemented:
- create, upload, rename, move, copy  
- share / unshare  
- archive / trash  

API remains **read-focused**. Calendar/HubSpot have propose→confirm write patterns; Drive does not yet.

---

## 7. Checksums / version IDs

**Status: Done**

Returned on search / read / revisions where Google provides them:

- `md5_checksum`
- `sha256_checksum`
- `head_revision_id`
- `version`

Supports proving which file version was analyzed.

---

## 8. Durable Fireflies ↔ Drive pairing

**Status: Partial**

**What works**
- `fireflies_correlate_meeting` searches Drive by meeting title and returns candidate `drive_file_ids`.
- Meeting index can persist correlated Drive file IDs.
- Drive-side Summaries + Transcripts **canonical folder pairing** and `conflicting_versions` (duplicates / misplaced logic).

**Gaps**
- Pairing is primarily **title / time / name heuristics**, not a hard durable key of `(file_id, meeting_timestamp)`.
- No first-class durable “this Fireflies meeting ≡ this Drive file forever” registry beyond correlate + index upsert.

**Related:** `fireflies_correlate_meeting`, `gdrive_find_duplicates`, meeting index

---

## Done vs remaining (short)

**Done / fixed**
- Rich search filters (dates, owner, editor, folder, MIME, full-text)
- Permissions, revisions, comments, shortcuts, sharing metadata
- Sheets tab/row/column reads with pagination
- Checksums and revision/version IDs

**Partial**
- True org-wide live search across all users’ Drives
- Binary materialization for all media types
- Durable Fireflies pairing by file ID + meeting timestamp

**Not started**
- Approval-gated Drive write actions (create/upload/rename/move/copy/share/trash)

---

## Related docs

- [GOOGLE-DRIVE-COLLAB-API-CURLS.md](./GOOGLE-DRIVE-COLLAB-API-CURLS.md) — endpoint curls and tool map  
- HelloMCP: `gdrive_*` tools in `hellomcp/server.js`
