Search Proton messages
search_messagesSearch a folder for messages by keyword and get the newest matches first, without marking them as read.
Instructions
Search one folder for messages whose text matches a query, newest first. Use it to find messages by keyword; to browse a folder without a query use list_messages, and to read a match use read_message with a UID returned here. It returns the same metadata as list_messages and never a body. The query is escaped into an IMAP TEXT search, so it cannot inject IMAP commands, and matching never marks a message as read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of matches to return, newest first. Defaults to 20. Excess matches are dropped rather than paged, so narrow the query when the result looks cut short. | |
| query | Yes | Text to look for in message headers and body, matched as a literal case-insensitive substring. IMAP TEXT search has no wildcard, boolean, or regular-expression syntax: metacharacters are escaped and matched literally. | |
| folder | No | Single folder to search, spelled exactly as list_folders reports it. Defaults to INBOX. A search never spans folders: call once per folder to cover several. | INBOX |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |