Skip to content

Conversation

@klemens-wisser-pcg
Copy link

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 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`.
@taylorwilsdon taylorwilsdon requested review from Copilot and taylorwilsdon and removed request for taylorwilsdon September 18, 2025 20:21
@taylorwilsdon taylorwilsdon self-assigned this Sep 18, 2025
@taylorwilsdon taylorwilsdon added the enhancement New feature or request label Sep 18, 2025
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +37 to +42
# 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.",
}
Copy link

Copilot AI Sep 18, 2025

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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Sep 18, 2025

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.

Copilot uses AI. Check for mistakes.
@taylorwilsdon
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants