gmail_act
ACT on the user's Gmail mailbox — ⚠️ every op here takes effect: a mail
LEAVES, a message moves. Reading and drafting are gmail.
op (required):
"send": send a mail, the mail LEAVES. Either an existing draft, as it stands:
draft_id(fromgmail(op="draft")orgmail(op="drafts")) — the usual path, the person could read it first; or a full message:to,subject,body(orreply_tofor a threaded reply), the same arguments asgmail(op="draft"). Returnskind: "sent", the messageidandthreadId. Never report "sent" without readingkind."archive": removes the INBOX label from
message_ids."trash": moves
message_idsto the trash (Gmail deletes them after 30 days). One call per message: a PARTIAL trash is possible and is named — replay only what was not attempted.
The sending account's Gmail signature is appended by default, after -- (none added when
the signature already opens with its own), like the Gmail web client does (the API never adds it on its own) — so do NOT write a sign-off block of
your own in body. signature in the answer says what happened: "appended",
"none_configured" (the account has no signature — nothing was added), or "disabled"
(sign=False). (A draft is sent as it stands: its signature was added when it was
written.)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>"
},
"name": "gmail_act"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | carbon-copy recipient(s), comma-separated. | |
| op | Yes | send | archive | trash. | |
| to | No | recipient(s), comma-separated. REQUIRED for a new message (omit when replying). | |
| bcc | No | blind-copy recipient(s), comma-separated — a new message only. | |
| _org | No | Org (id) de CET APPEL. `oto_list_orgs()`. | |
| body | No | the message, rendered from markdown to HTML by default. | |
| html | No | explicit HTML body (bypasses markdown rendering). | |
| sign | No | append the account's Gmail signature (default True); False writes the body alone. | |
| _group | No | Équipe (id) de CET APPEL, sous son org parente. | |
| _run_id | No | OBLIGATOIRE à chaque appel dès `run_start` ou `data_claim_next` : sans lui, l'écriture sur une ligne réservée est refusée. Hérité seulement si le serveur tient un run actif — n'y compte pas. | |
| account | No | email of the Google account to use — same choice as `_account`. | |
| subject | No | subject line (new message only; a reply keeps the thread's subject). | |
| _account | No | Compte à OPÉRER quand plusieurs existent. `oto_identity(op='list')`. | |
| _project | No | Projet (id) de CET APPEL — jeton PRIMAIRE. `oto_project(op='list')`. | |
| draft_id | No | op="send" — the draft to send, as it stands (no other argument). | |
| markdown | No | render `body` from markdown when `html` is absent (default True). | |
| reply_to | No | id of the message to reply to. When set, this is a threaded REPLY (subject/thread preserved) and `to`/`subject` are ignored. | |
| _instance | No | Instance de connecteur PRÉCISE (un credential exact). `oto_instance(op='list')`. | |
| from_name | No | optional display name for the From header. | |
| attachments | No | files to attach, as `source` refs oto resolves server-side (the agent has no local disk). Each item — `kind` selects the origin: - Drive: `{"kind":"drive","file_id":"<id>"}` (id from drive_list/metadata) - Gmail: `{"kind":"gmail","message_id":"<id>","filename":"<name>"}` - URL: `{"kind":"url","url":"https://…"}` — e.g. a signed URL from `oto_upload_url` (upload a local PDF first) or drive_download. Named by the server's `Content-Disposition`, else the path; `"filename"` forces the name (its extension types the file). - Project file: `{"kind":"project_file","project_id":<id>,"file_id":<id>}` (ids from oto_project_files op=list) | |
| message_ids | No | op="archive"/"trash" — the message ids to act on. |