search_messages
Search mailbox messages by folder, date, sender, subject, body, or read/flagged status, returning identifiers and metadata for follow-up mail actions.
Instructions
Search messages, newest first. Returns one line per message with the folder, uidvalidity and uid that every other tool needs, plus date, sender, recipients, subject, flags, size and attachment count. All criteria are optional and combine with AND.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Text to find in the message body. | |
| limit | No | How many results to return (default 25, at most 100). | |
| since | No | Only messages received on or after this date (YYYY-MM-DD). | |
| before | No | Only messages received before this date (YYYY-MM-DD). | |
| folder | No | Folder to search, or "all" for every folder. | INBOX |
| offset | No | Skip this many results, for paging. | |
| sender | No | Text to find in the From header. | |
| unread | No | true = unread only, false = read only. | |
| flagged | No | true = flagged only, false = unflagged only. | |
| subject | No | Text to find in the subject. | |
| recipient | No | Text to find in the To or Cc headers. |