list_folders
Enumerate folders and labels.
- Gmail
- Full
- IMAP
- Partial, no archive, starred or important
Tools
Every tool only inspects mail. There is no send, move, delete, label or mark-as-read capability to enable; the gate defaults to read-only and the code has no write path.
list_foldersEnumerate folders and labels.
search_emailsQuery mail and return sender, subject, date, attachment flag, message and thread ids.
count_emailsCount matches without returning them.
get_emailRead one message's headers and text body.
get_threadRead a conversation oldest-first.
list_attachmentsList a message's attachments with index, type and size.
get_attachmentSave an attachment, or return an image inline.
server_infoReport accounts, capabilities and per-tool support, with an optional live probe.
The same filter shape works on both providers, but each one fills in as much as it can. Where a filter cannot be honoured, the server explains that instead of guessing.
| Filter | Gmail | Generic IMAP |
|---|---|---|
fromsubject
|
Full | Full |
unread
|
Full | Full |
keyword
|
Full, full syntax: from, label, larger, OR | Partial, literal text only |
has_attachment
|
Full | Not supported, refused with an explanation |
afterbefore
|
Full, Gmail date semantics | Partial, arrival date, not the Date header |
folderlimitcursor
|
Full | Full |
server_info returns a per-account support map, so the agent can check whether
get_thread is native or reconstructed before using it.
{
"accounts": [
{
"id": "work", "provider": "gmail",
"capabilities": ["search","count","read","thread","attachments"],
"tools": { "search_emails": "full", "get_thread": "full" }
},
{
"id": "corp", "provider": "imap",
"capabilities": ["search","count","read","attachments"],
"tools": { "search_emails": "partial", "get_thread": "partial" }
}
]
}
get_attachment writes to disk and returns a path by default. Pass
inline: true to receive an image as an image block; opt-in, because images
cost vision tokens and their contents are untrusted input. Anything above ~4 MB still
returns a file.