Commit Graph

118 Commits

Author SHA1 Message Date
Taylor Wilsdon
a7a10deb78 ruff 2026-03-16 10:44:33 -04:00
Taylor Wilsdon
3c6978840f refac 2026-03-15 18:19:07 -04:00
hindmakarem-qa
4d79bf2817 fix: #457 llm will add rfp compliant id when replying 2026-03-12 02:30:34 +01:00
github-actions[bot]
95120d6f26 style: auto-fix ruff lint and format 2026-03-03 15:12:33 +00:00
Taylor Wilsdon
92840ac8e8 better fallback logic for html in emails 2026-03-02 09:29:53 -05:00
github-actions[bot]
eaab19b1ca style: auto-fix ruff lint and format 2026-03-01 17:54:47 +00:00
Taylor Wilsdon
241433937b Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp into tool_consolidation 2026-03-01 12:36:10 -05:00
Taylor Wilsdon
6753531e9d refactor tools to consolidate all modify actions 2026-03-01 12:36:09 -05:00
Taylor Wilsdon
3fc864928e fix issues/525 and issues/485 2026-03-01 12:06:23 -05:00
Taylor Wilsdon
252487fd88 Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 10:30:36 -04:00
User
2526b87a52 fix: also strip null bytes from attachment filename for consistency 2026-02-23 11:14:21 +08:00
stakeswky
0dc9985d33 fix: use RFC 2231 encoding for non-ASCII attachment filenames
When creating Gmail drafts with attachments whose filenames contain
non-ASCII characters (e.g. umlauts like ü, ö, ä), Gmail displays
"noname" instead of the actual filename.

The root cause is that Content-Disposition was built via string
formatting (f'attachment; filename="{safe_filename}"'), which embeds
raw non-ASCII bytes in the header.  Gmail cannot parse these and falls
back to "noname".

Fix: pass the filename as a keyword argument to add_header(), which
makes Python's email library automatically apply RFC 2231 encoding
(filename*=utf-8''...) for non-ASCII names while keeping ASCII
filenames unchanged.

Fixes #500
2026-02-23 10:40:56 +08:00
Taylor Wilsdon
9588396fcb ruff 2026-02-15 16:46:28 -05:00
Taylor Wilsdon
39fe339dc8 fixes 2026-02-15 16:46:19 -05:00
Taylor Wilsdon
7cfa10f457 readme and storage improvements 2026-02-15 16:28:34 -05:00
Taylor Wilsdon
0131f5472f fixes 2026-02-15 16:17:03 -05:00
Taylor Wilsdon
87b7889e5b Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp into fix/attachment-storage-absolute-path 2026-02-15 12:25:08 -05:00
Taylor Wilsdon
7f90073fb4 ruff 2026-02-13 15:26:37 -05:00
Taylor Wilsdon
71c054c664 harden security around attachment functionality and explicitly disallow reading sensitive files 2026-02-13 15:24:57 -05:00
Taylor Wilsdon
9a6d597e69 ruff 2026-02-13 10:15:31 -05:00
Taylor Wilsdon
a336131558 clean up bodyparams logic 2026-02-13 10:07:10 -05:00
Taylor Wilsdon
a24804771a get idiomatic with it 2026-02-11 19:03:24 -05:00
Taylor Wilsdon
d31e2816a4 Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into issues/440 2026-02-11 11:58:24 -05:00
Taylor Wilsdon
f6aaf75b4f remove Field designation 2026-02-11 11:58:19 -05:00
Taylor Wilsdon
8c92390576 add message id headers for proper threading in in non-gmail clients 2026-02-11 11:52:07 -05:00
Taylor Wilsdon
2bef6d0c0b fix cli mode 2026-02-10 14:05:56 -05:00
xuiltul
57daf2ab30 fix: use absolute path for attachment storage and improve filename resolution
Fixes #327

- Use absolute path (~/.workspace-mcp/attachments/) instead of relative
  ./tmp/attachments to avoid polluting working directories
- Make storage directory configurable via WORKSPACE_ATTACHMENT_DIR env var
- Return file path from save_attachment() instead of UUID for direct
  filesystem access (useful in stdio mode where HTTP URLs are unavailable)
- Preserve original filenames with UUID suffix for uniqueness
- Use format="full" instead of format="metadata" when fetching attachment
  info, as metadata format doesn't include attachmentId in parts
- Add multi-level filename matching: exact attachmentId → size-based
  fallback → single-attachment fallback (handles ephemeral IDs)
2026-02-02 16:43:34 +09:00
Taylor Wilsdon
ddcc45d026 ruff 2026-01-30 10:47:54 -05:00
Taylor Wilsdon
7bf67ecbb9 feedbvack 2026-01-30 10:43:04 -05:00
Taylor Wilsdon
7910cfe6a3 rfc 5322 2026-01-30 10:33:49 -05:00
Taylor Wilsdon
054780664d ruff 2026-01-30 10:20:05 -05:00
Taylor Wilsdon
46eeeb6524 fixes 2026-01-29 19:43:21 -05:00
Taylor Wilsdon
736f2756d6 fixes 2026-01-29 19:43:09 -05:00
Taylor Wilsdon
e99479b63c ruff 2026-01-29 19:23:23 -05:00
Song Meo
5df04b6d28 Merge upstream/main: integrate Send As feature with attachment support 2026-01-23 20:24:37 +02:00
Song Meo
7a724650b3 Fix docstring to match Optional type annotation for attachments 2026-01-23 20:21:00 +02:00
Song Meo
2266e7da58 Address Copilot review: sanitize filename and fix mutable default 2026-01-23 20:16:55 +02:00
Song Meo
21bac3a713 Fix attachment parameter type inconsistency in send_gmail_message 2026-01-23 20:12:42 +02:00
Song Meo
edeeaa82bc Add attachment support to Gmail send and draft functions
- Add file path and base64 content attachment support
- Auto-detect MIME types from file extensions
- Support attachments in both send_gmail_message and draft_gmail_message
- Accept attachments via 'path' (file path) or 'content' (base64) + 'filename'
- Note: FastMCP schema generation issue prevents List[Dict] from appearing in MCP tool schema
2026-01-23 02:33:58 +02:00
Martin Schenk
e78fecd8c1 feat(gmail): Add Send As support for send_gmail_message and draft_gmail_message
- Add optional from_email parameter to send_gmail_message
- Add optional from_email parameter to draft_gmail_message
- Allows sending/drafting from configured Gmail Send As aliases
- Falls back to authenticated user email if not specified
- Requires Send As alias to be configured in Gmail settings (Settings > Accounts > Send mail as)
- Updated docstrings with new parameter documentation and examples

This enables users to send emails from different email addresses configured
in their Gmail "Send mail as" settings, which is useful for users who manage
multiple email identities through a single Gmail account.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:35:55 +01:00
Peter Hartree
ead1229874 feat(gmail): Add from_name parameter for sender display name
Add optional from_name parameter to send_gmail_message and draft_gmail_message
functions. When provided, the From header is formatted as "Name <email>" instead
of just the email address.

This allows users to include their display name in sent emails, matching the
behaviour of composing emails directly in Gmail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:14:27 +01:00
Dmytro Dziuma
1957466c08 Add Date header to Gmail tools output and update docstrings.
- Update 'GMAIL_METADATA_HEADERS' to include 'Date'.
- Update 'get_gmail_message_content' to display the 'Date' field.
- Update 'get_gmail_messages_content_batch' to display the 'Date' field in both metadata and full formats.
- Update docstrings to include 'Date' and 'Message-ID' in Returns description.
2026-01-05 23:37:00 +00:00
Taylor Wilsdon
70d4a234f9 ruff 2025-12-27 12:08:58 -08:00
Taylor Wilsdon
b5baead3ba Update gmail/gmail_tools.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-27 10:27:07 -08:00
Dmytro Dziuma
53a93948c6 feat(gmail): add RFC822 Message-ID support 2025-12-24 10:50:49 +00:00
Taylor Wilsdon
c8391d77b5 ruff 2025-12-19 16:13:01 -05:00
Taylor Wilsdon
c945472f15 fix 2025-12-19 16:10:24 -05:00
Taylor Wilsdon
db38f5156b ruff 2025-12-19 16:00:28 -05:00
Taylor Wilsdon
1a2ca23d3f fallback for html only messages 2025-12-19 15:58:45 -05:00
Taylor Wilsdon
6b8352a354 apply ruff formatting 2025-12-13 13:49:28 -08:00