Create watch
create_watchCreate event-based mailbox watches to get notified of thread replies, new senders, query matches, or missing replies instead of polling search.
Instructions
Watch a mailbox for new mail and get events instead of polling search. kind: thread_reply (a new message in thread_id from someone other than the mailbox owner), from (new mail from an address or a domain), query (new mail matching a where filter, same schema as search_messages, checked against newly indexed messages only), no_reply_by (no message from others in thread_id, or after message_id, before deadline: fires once at the deadline; a reply ends the watch quietly, end_reason replied; the mailbox owner's own follow-ups do not count). A just-sent message is found once it is indexed. Needs the search index on the mailbox. Events carry ids only (no subject, sender or body): read them with list_watch_events, then fetch the message with get_message. Optional sink names an operator webhook from list_watches for push delivery. Expires after 30 days by default (max 180); at most 50 active watches per connection.
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": {
"account": "<account>",
"kind": "<kind>"
},
"name": "create_watch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | from: an address (ann@example.com) or a domain (example.com). | |
| kind | Yes | What to watch for; each kind uses the fields named below. | |
| sink | No | Name of an operator webhook sink (list_watches). | |
| where | No | query: a search_messages `where` condition. | |
| account | Yes | Mailbox alias or email address from list_accounts. | |
| deadline | No | no_reply_by: RFC 3339 instant. | |
| thread_id | No | thread_reply, no_reply_by: thread id from search_messages or get_message. | |
| expires_at | No | Default 30 days from now, at most 180. | |
| message_id | No | no_reply_by, instead of thread_id: the message that should get an answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | ||
| kind | No | ||
| sink | No | ||
| fired | No | ||
| state | No | ||
| where | No | ||
| account | No | ||
| deadline | No | ||
| watch_id | No | ||
| thread_id | No | ||
| created_at | No | ||
| end_reason | No | ||
| expires_at | No | ||
| message_id | No | ||
| last_fired_at | No |