anthropics / anthropics/claude-code

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

Aperta
#88,544 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:mcp enhancement
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

## 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.