Skip to main content
Glama

Search AgentMail messages

search_agentmail_messages
Read-only

Find messages in an AgentMail inbox and return their metadata (id, thread, sender, recipients, subject, date, preview, labels) — not full bodies. With query, a full-text search of sender, recipients, subject and body, best match first. Without it, the newest messages, optionally filtered by labels and by from/to/subject substrings. Then read one with get_agentmail_message, or file it with update_agentmail_labels. Trashed and spam messages are skipped unless asked for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoA recipient contains this text
fromNoSender contains this text
afterNoOnly messages after this time (ISO 8601)
limitNoMax results (default 20, cap 100)
queryNoFull-text search; when given, labels/from/to/subject are ignored
beforeNoOnly messages before this time (ISO 8601)
labelsNoOnly messages carrying all of these labels, e.g. ["unread"]
mailboxYesAddress of the connected AgentMail inbox to act on. Call list_authorized_mailboxes to see available options.
subjectNoSubject contains this text
pageTokenNonextPageToken from the previous call, for the next page
includeSpamNo
includeTrashNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources