-
Notifications
You must be signed in to change notification settings - Fork 240
feat(gmail): Add vacation responder tool #211
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?
feat(gmail): Add vacation responder tool #211
Conversation
This commit adds the ability to manage Gmail's vacation responder settings. Two new tools have been added: - `get_vacation_settings`: Retrieves the current vacation responder settings. - `set_vacation_settings`: Updates the vacation responder settings. A new scope, `GMAIL_SETTINGS_BASIC_SCOPE`, has been added to `auth/scopes.py` to support this functionality.
This commit adds a new tool to the Google Calendar integration to allow creating "out of office" events. A new tool, `create_out_of_office_event`, has been added to `gcalendar/calendar_tools.py`.
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 vacation responder management functionality to Gmail tools, enabling users to get and set their Gmail vacation/auto-reply settings programmatically.
- New Gmail vacation responder tools for retrieving and updating settings
- Addition of Gmail settings basic scope for proper API access
- New calendar tool for creating out-of-office events with auto-decline functionality
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| auth/scopes.py | Adds GMAIL_SETTINGS_BASIC_SCOPE and includes it in GMAIL_SCOPES list |
| gmail/gmail_tools.py | Implements get_vacation_settings and set_vacation_settings functions |
| gmail/test_gmail_tools.py | Adds comprehensive test coverage for vacation settings tools |
| gcalendar/calendar_tools.py | Implements create_out_of_office_event function |
| gcalendar/test_calendar_tools.py | Adds test coverage for out-of-office event creation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # 3. Get new settings to confirm | ||
| service.users.return_value.settings.return_value.getVacation.return_value.execute.return_value = { | ||
| "enableAutoReply": True, | ||
| "responseSubject": "On vacation", | ||
| "responseBodyHtml": "I am on vacation.", | ||
| } |
Copilot
AI
Sep 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.
[nitpick] The mock return value is being reassigned multiple times within the same test. Consider creating a helper method to set mock responses or use side_effect to return different values on subsequent calls for better test clarity.
| user_google_email (str): The user's Google email address. Required. | ||
| enable (bool): Whether to enable or disable the vacation responder. | ||
| subject (Optional[str]): The subject of the vacation response. | ||
| body (Optional[str]): The body of the vacation response, in HTML format. |
Copilot
AI
Sep 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 documentation states the body is in HTML format, but the parameter name and implementation suggest it accepts any string. Consider clarifying whether HTML formatting is required or if plain text is also acceptable.
|
I'm wondering if a more generic "manage settings" tool that can do all of the above depending on what gets passed to it is a more effective way to accomplish this. We're already at the point of saturating almost all mainstream clients pushing 80-90 tools so ideally we consolidate anything that we can into a single registered tool that accepts arguments rather than an individual tool per task. I think this is valuable and would like to get added! |
This commit adds the ability to manage Gmail's vacation responder settings.
Two new tools have been added:
get_vacation_settings: Retrieves the current vacation responder settings.set_vacation_settings: Updates the vacation responder settings.A new scope,
GMAIL_SETTINGS_BASIC_SCOPE, has been added toauth/scopes.pyto support this functionality.