Tools

Eight tools. All read-only.

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_folders

Enumerate folders and labels.

Gmail
Full
IMAP
Partial, no archive, starred or important

search_emails

Query mail and return sender, subject, date, attachment flag, message and thread ids.

Gmail
Full, full query language
IMAP
Partial, plain search, no operators

count_emails

Count matches without returning them.

Gmail
Full
IMAP
Full

get_email

Read one message's headers and text body.

Gmail
Full
IMAP
Full

get_thread

Read a conversation oldest-first.

Gmail
Full, native thread id
IMAP
Partial, reconstructed from headers

list_attachments

List a message's attachments with index, type and size.

Gmail
Full
IMAP
Full

get_attachment

Save an attachment, or return an image inline.

Gmail
Full
IMAP
Full

server_info

Report accounts, capabilities and per-tool support, with an optional live probe.

Gmail
Full
IMAP
Full

Search filters

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.

FilterGmailGeneric 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

Know before you call

server_info returns a per-account support map, so the agent can check whether get_thread is native or reconstructed before using it.

server_info
{
  "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" }
    }
  ]
}

Attachments and images

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.