-
Notifications
You must be signed in to change notification settings - Fork 248
Feat/docs folder support #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add folder_id and folder_name parameters to create_doc function - Support both My Drive and Shared Drives (Team Drives) - Add find_or_create_folder helper function in drive_helpers.py - Add create_drive_folder and search_drive_folders tools - Create documents directly in specified folders using Drive API - Proper error handling and logging for folder operations - Support for supportsAllDrives parameter for Shared Drives
…ce_mcp into feat/docs-folder-support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive folder support to Google Docs creation, enabling users to create documents in specific folders within My Drive or Shared Drives, with automatic folder creation when needed.
Key changes:
- Enhanced document creation with folder placement capabilities
- Added folder management utilities for finding, creating, and searching folders
- Implemented proper Shared Drive support with Drive API integration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| gdrive/drive_helpers.py | Added find_or_create_folder async function for folder discovery and creation with Shared Drive support |
| gdocs/docs_tools.py | Enhanced create_doc with folder parameters, added create_drive_folder and search_drive_folders tools |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| include_items_from_all_drives: Whether to include items from all drives when searching | ||
| Returns: | ||
| str: Folder ID if found/created, None if failed |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type annotation in the function signature shows str but the docstring and implementation can return None. The return type should be Optional[str] to accurately reflect the possible return values.
|
I like this, appreciate the PR! Looks like it would close #236 as well. Little less sure about the value of search within folder, since you should already be able to do that with the base search drive file. We're at the point of saturating small model context windows based on the sheer number of tool descriptions if users don't exclude certain tools or leverage the tool tiers, so I'm trying to balance nice to have functionality against keeping bloat down :D Let me know if you're game to drop the search part @yakiv07 happy to get this merged |
Adds the ability to create Google Docs in specific folders (My Drive or Shared Drives) with automatic folder creation if needed.
Key Features
Changes
create_docfunction withfolder_idandfolder_nameparametersfind_or_create_folderhelper indrive_helpers.pycreate_drive_folderandsearch_drive_folderstoolssupportsAllDrives=True