anthropics / anthropics/claude-code

Gmail connector: send_message/reply cannot apply the account's Gmail signature, and there is no way to read it

Đang mở
#88,544 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:mcp enhancement
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

## What happens

The Gmail MCP connector's `send_message`, `reply` and `create_draft` send exactly the body they are given. The signature configured on the Gmail account (Settings > General > Signature) is never appended, and no tool exposes it for reading.

`list_send_as` returns send-as aliases but not the signature HTML.

## Why it matters

For anyone whose email carries professional identity — a publicist writing on a client's behalf, a lawyer, anyone whose signature is how the recipient knows who they are and what authority they have — an email sent through this connector arrives unsigned and looks like it came from nobody. That is not a cosmetic difference; it changes whether the recipient acts on the message.

The only workaround today is to fetch a previously sent message with `get_message` at `FULL_CONTENT`, extract the `div.gmail_signature` block by hand, and paste it into `htmlBody` on every send. That is fragile, silently goes stale when the user edits their signature, and requires an unrelated read of the mailbox before every write.

## Asks, in order of usefulness

1. A `signature: true` (or `sendAsEmail`) option on `send_message`, `reply` and `create_draft` that applies the account's configured signature, the way the Gmail web composer does.
2. Failing that, expose the signature HTML for read — either as a field on `list_send_as` or a dedicated tool — so a caller can attach it deliberately.

Gmail's own API exposes this: `users.settings.sendAs.list` returns a `signature` field per send-as address. The data is already one call away.

## Related paper cut

When only `body` (plain text) is supplied, the message goes out with no HTML alternative, so any structure the caller wanted is lost. When both `body` and `htmlBody` are supplied they are treated as alternatives, which is correct, but there is no validation that the two actually correspond — a malformed call can ship a plain-text part that does not match the HTML part, and nothing warns.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by locating the Gmail MCP connector implementations for send_message, reply, create_draft, and list_send_as, then inspect how users.settings.sendAs.list is used. Decide how the requested signature option or signature-reading capability fits those tools, including plain-text and HTML behavior; done means the configured signature can be applied or read without manually fetching a prior message.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.