Wait for new email
wait_for_new_emailsWait for incoming email in a folder and return only newly arrived messages, with a timeout if nothing arrives. Use it to block until an expected message, such as a verification code, shows up.
Instructions
Block until mail arrives in the folder, then return the new messages.
Use this to wait for something expected, such as a verification code. It returns as soon as anything arrives, or empty-handed when the timeout elapses; nothing already in the folder is reported.
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": "wait_for_new_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum messages to return. | |
| folder | No | Folder to watch. | INBOX |
| timeout_seconds | No | How long to wait before giving up. | |
| poll_interval_seconds | No | Seconds between checks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | No | Messages that arrived during the wait, oldest first. | |
| timed_out | Yes | True when the wait elapsed with nothing new arriving. | |
| waited_seconds | Yes |