Skip to content

Conversation

@mutianzhai
Copy link

Adds 'minimal' and 'metadata' format options for get_gmail_thread_content and get_gmail_threads_content_batch.

"minimal" - Returns only the id and threadId of each message.
"metadata" - Returns message metadata such as headers, labels, and snippet, but not the full body.
"full" (The current option) - Returns the full email message data, including headers and body.

Copilot AI and others added 4 commits October 26, 2025 13:43
…t-parameter

[WIP] Add optional format parameter to Gmail thread content retrieval
…format types (#2)

* Initial plan

* Implement format-aware output in _format_thread_content

Co-authored-by: mutianzhai <[email protected]>

* Address code review feedback - improve documentation and constants

Co-authored-by: mutianzhai <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mutianzhai <[email protected]>
* Initial plan

* Remove 'raw' format support from Gmail thread functions

- Removed 'raw' from valid_formats list in _validate_format_parameter
- Removed 'raw' format handling code from _format_thread_content
- Updated docstrings for get_gmail_thread_content and get_gmail_threads_content_batch
- Updated README.md to remove 'raw' format documentation

Co-authored-by: mutianzhai <[email protected]>

* Remove unused RAW_CONTENT_PREVIEW_LIMIT constant

The constant was only used for raw format handling which has been removed.

Co-authored-by: mutianzhai <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mutianzhai <[email protected]>
* Initial plan

* Implement modify_gmail_thread_labels and batch_modify_gmail_thread_labels tools

Co-authored-by: mutianzhai <[email protected]>

* Add documentation for new thread label modification tools

Co-authored-by: mutianzhai <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: mutianzhai <[email protected]>
@taylorwilsdon
Copy link
Owner

It looks like it's a much larger change than just the format options, adding a few tools? Does the message label tool not work for threads? Afaik the parent message for a given thread is what ultimately dictates the label for the whole thing.

@mutianzhai
Copy link
Author

Sorry I should not have made the pull from main. Regarding the labels, if you search for gmail messages without a label, you'll get messages from the thread that don't have the label (I think labels are localized to the message). So if you want to exclude all messages on a thread that has a label, I think you have to label all the messages in the thread. Just an idea if you want to use.

@taylorwilsdon taylorwilsdon added the enhancement New feature or request label Nov 2, 2025
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