Skip to content

feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar#3338

Merged
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/san-jose-v1
Feb 25, 2026
Merged

feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar#3338
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/san-jose-v1

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add 10 new Gmail V2 tools: list_drafts, get_draft, delete_draft, create_label, delete_label, list_labels, get_thread, list_threads, trash_thread, untrash_thread
  • Add 2 new Google Drive tools: move (file/folder), search (advanced query syntax)
  • Add 3 new Google Sheets V2 tools: delete_rows, delete_sheet, delete_spreadsheet
  • Add Google Calendar freebusy tool (V1 + V2)
  • All tools verified against official Google API docs
  • No new OAuth scopes required
  • Fix biome.json unknown nursery rule

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 25, 2026 9:34pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Added 18 new Google API tools across Gmail, Drive, Sheets, and Calendar services. All tools follow existing patterns with proper TypeScript typing, OAuth configuration, and error handling.

Gmail (10 new V2 tools):

  • Draft management: list_drafts, get_draft, delete_draft
  • Label management: create_label, delete_label, list_labels
  • Thread management: get_thread, list_threads, trash_thread, untrash_thread

Google Drive (2 new tools):

  • move - File/folder relocation with parent manipulation
  • search - Advanced query syntax support with pagination

Google Sheets (3 new V2 tools):

  • delete_rows - Row deletion via batchUpdate API
  • delete_sheet - Tab/sheet deletion
  • delete_spreadsheet - Full spreadsheet deletion via Drive API

Google Calendar (2 new tools):

  • freebusy V1 and V2 - Calendar availability checking

All tools properly registered in tools/registry.ts. Also removed unknown noNestedComponentDefinitions nursery rule from biome.json.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All new tools follow established patterns with proper TypeScript typing, error handling, and OAuth configuration. Code is consistent with existing tools in the same directories. The biome.json fix removes an unknown rule that would have caused issues.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/gmail/get_thread.ts Added Gmail get thread V2 tool with message parsing and body extraction
apps/sim/tools/gmail/list_threads.ts Added Gmail list threads V2 tool with pagination, filtering, and query support
apps/sim/tools/google_drive/move.ts Added Google Drive move tool using directExecution with parent manipulation
apps/sim/tools/google_drive/search.ts Added Google Drive search tool supporting advanced query syntax with pagination
apps/sim/tools/google_sheets/delete_rows.ts Added Google Sheets delete rows V2 tool using batchUpdate API
apps/sim/tools/google_calendar/freebusy.ts Added Google Calendar freebusy tools (V1 and V2) for checking availability
apps/sim/tools/registry.ts Registry updated to include all 18 new tools across Gmail, Drive, Sheets, and Calendar
biome.json Removed unknown nursery rule and simplified ignore patterns

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[New Google Tools] --> B[Gmail V2 Tools]
    A --> C[Google Drive Tools]
    A --> D[Google Sheets V2 Tools]
    A --> E[Google Calendar Tools]
    
    B --> B1[Draft Management]
    B --> B2[Label Management]
    B --> B3[Thread Management]
    
    B1 --> B1a[list_drafts]
    B1 --> B1b[get_draft]
    B1 --> B1c[delete_draft]
    
    B2 --> B2a[create_label]
    B2 --> B2b[delete_label]
    B2 --> B2c[list_labels]
    
    B3 --> B3a[get_thread]
    B3 --> B3b[list_threads]
    B3 --> B3c[trash_thread]
    B3 --> B3d[untrash_thread]
    
    C --> C1[move - Parent folder manipulation]
    C --> C2[search - Advanced query syntax]
    
    D --> D1[delete_rows - batchUpdate API]
    D --> D2[delete_sheet - Delete tab]
    D --> D3[delete_spreadsheet - Drive API]
    
    E --> E1[freebusy V1 - Summary output]
    E --> E2[freebusy V2 - API-aligned output]
    
    B --> F[Registry]
    C --> F
    D --> F
    E --> F
    
    F --> G[tools/registry.ts - 18 new tools registered]
Loading

Last reviewed commit: c502b30

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

26 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/san-jose-v1 branch from c75c02c to c22443e Compare February 25, 2026 21:31
@waleedlatif1 waleedlatif1 merged commit 16f337f into staging Feb 25, 2026
6 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/san-jose-v1 branch February 25, 2026 21:38
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if (textPart?.body?.data) {
body = Buffer.from(textPart.body.data, 'base64').toString()
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Body extraction misses HTML-only and nested multipart emails

Medium Severity

The inline body extraction logic in get_draft.ts and get_thread.ts only handles direct body data and text/plain MIME parts. It misses text/html fallback and recursive nested multipart structures, returning an empty body for HTML-only emails. The existing exported extractMessageBody utility in utils.ts already handles all these cases correctly and is used by other Gmail tools like read.

Additional Locations (1)

Fix in Cursor Fix in Web

waleedlatif1 added a commit that referenced this pull request Feb 25, 2026
#3338)

* feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar

* fix(google-drive): remove dead transformResponse from move tool
waleedlatif1 added a commit that referenced this pull request Feb 25, 2026
* feat(workflow): lock/unlock workflow from context menu and panel

* lint

* fix(workflow): prevent duplicate lock notifications, no-op guard, fix orphaned JSDoc

* improvement(workflow): memoize hasLockedBlocks to avoid inline recomputation

* feat(google-translate): add Google Translate integration (#3337)

* feat(google-translate): add Google Translate integration

* fix(google-translate): api key as query param, fix docsLink, rename tool file

* feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar (#3338)

* feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar

* fix(google-drive): remove dead transformResponse from move tool

* feat(confluence): return page content in get page version tool (#3344)

* feat(confluence): return page content in get page version tool

* lint

* feat(api): audit log read endpoints for admin and enterprise (#3343)

* feat(api): audit log read endpoints for admin and enterprise

* fix(api): address PR review — boolean coercion, cursor validation, detail scope

* ran lint

* unified list of languages for google translate

* fix(workflow): respect snapshot view for panel lock toggle, remove unused disableAdmin prop

* improvement(canvas-menu): remove lock icon from workflow lock toggle

* feat(audit): record audit log for workflow lock/unlock
waleedlatif1 added a commit that referenced this pull request Feb 26, 2026
* feat(workflow): lock/unlock workflow from context menu and panel

* lint

* fix(workflow): prevent duplicate lock notifications, no-op guard, fix orphaned JSDoc

* improvement(workflow): memoize hasLockedBlocks to avoid inline recomputation

* feat(google-translate): add Google Translate integration (#3337)

* feat(google-translate): add Google Translate integration

* fix(google-translate): api key as query param, fix docsLink, rename tool file

* feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar (#3338)

* feat(google): add missing tools for Gmail, Drive, Sheets, and Calendar

* fix(google-drive): remove dead transformResponse from move tool

* feat(confluence): return page content in get page version tool (#3344)

* feat(confluence): return page content in get page version tool

* lint

* feat(api): audit log read endpoints for admin and enterprise (#3343)

* feat(api): audit log read endpoints for admin and enterprise

* fix(api): address PR review — boolean coercion, cursor validation, detail scope

* ran lint

* unified list of languages for google translate

* fix(workflow): respect snapshot view for panel lock toggle, remove unused disableAdmin prop

* improvement(canvas-menu): remove lock icon from workflow lock toggle

* feat(audit): record audit log for workflow lock/unlock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant