Add Gmail Thread ID (source_conversation_id) to MCP API responses #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of the things that I'm using msgVault for is a local cache of my Gmail to use with agents like Claude Code. This then allows me to operate on Gmail via their API but knowing the things that I'm going to look for in advance and avoiding gmails terrible search and non-existant mcp.
This might be different to the use case that this is actually built for which seems to be primarily archiving. So, like my other PR, I am very understanding if this functionality is outside of the scope of what you want to build here. However, whenever I want to create draft emails to a thread, I had to go to Gmail to try and look up the conversation ID and the thread ID.
So, I just built it into msgVault and into the MCP. Probably it could do with some work on the TUI side of things. Happy to go and take a look at that if you think that this is a useful feature. But my primary use case was the MCP, so I built it for that. Apologies if that's a little bit rude.
Also apologies that there's now a new table and therefore a little bit extra bloat to things.
The MCP tools (list_messages, get_message, search_messages) now return source_conversation_id which maps to Gmail's thread ID, enabling clients to group messages by conversation.