wait_for_code
Wait for a message with an extracted code/link in an inbox (long-poll, no client polling). Broadcast semantics: multiple concurrent waiters all match the same arriving mail — coordinate multi-agent consumption separately. Mail held while the inbox is paused is matched too. First scans mail that arrived in the last 15 minutes (WAIT_HISTORY_WINDOW) — an already-arrived code returns immediately; otherwise parks until timeoutSec. fromMatch: "any" (default) matches the display From header or the SMTP envelope sender; "envelope" matches ONLY the envelope sender (unforgeable). Note for "envelope": ESP mail (e.g. SES) often uses a bounce address as the envelope sender, so filtering by the brand display domain will not match — use "any" unless you know the envelope domain.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inboxId": "<inboxId>"
},
"name": "wait_for_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | ||
| inboxId | Yes | ||
| fromMatch | No | any (default): match display From or envelope sender; envelope: only the SMTP envelope sender (unforgeable — recommended for brand-domain automation). | |
| timeoutSec | No | Default 60, max 300. |