Tools¶
The token's scopes decide what a client may do. A tool whose scope the token lacks is refused by MailFlow, and the answer names the scope.
flowchart TD
T[a tool call] --> A{on mailflow-mcp's<br/>list of routes?}
A -- no --> X[refused before<br/>it leaves the process]
A -- yes --> S{does the token<br/>have the scope?}
S -- no --> F[MailFlow: 403,<br/>the scope is named]
S -- yes --> G{a destination<br/>MailFlow forbids?}
G -- yes --> R[MailFlow refuses]
G -- no --> D[done]
Start at the top: the first check is this server's, the other two are MailFlow's.
Scope read¶
| Tool | What it does |
|---|---|
list_accounts |
The mail accounts, with their ids, addresses and aliases |
list_folders |
One account's folders, with paths and counts |
list_messages |
A folder, or the unified inbox, as short summaries |
get_message |
One message in full, as plain text, with the attachments' names and sizes |
get_thread |
A conversation across folders, your own replies included |
search_messages |
Search with from:, to:, subject:, after:, in: and others. Trash only with in:trash |
search_contacts |
Addresses by name, up to 10 |
unread_counts |
Unread messages in each account's INBOX; other folders are not counted |
category_counts |
Inbox messages per category MailFlow sorted them into |
Scope organize¶
| Tool | What it does |
|---|---|
mark_read |
Mark messages read or unread |
star_messages |
Star messages, or remove the star |
archive_messages |
Move messages into their account's archive folder |
move_messages |
Move messages into another folder of their account |
snooze_message |
Hide a conversation until a time, at most 30 days away |
unsnooze_message |
Bring a snoozed conversation back now |
set_category |
Put a message in another category |
The four that take several messages (read, star, archive, move) take up to 500 per call. A message that moves gets a new id. MailFlow never lets a token move mail into Trash, Junk, Drafts or Snoozed, and drafts can't be moved.
Scope draft¶
| Tool | What it does |
|---|---|
create_draft |
Save a plain-text draft, new or as a reply. preview_only shows exactly what would be saved |
A reply takes the recipient, the subject, the threading headers, the quote and the alias from the original, as MailFlow's composer does. The account's signature setting and its automatic Cc and Bcc apply.