search
Locate email threads across IMAP accounts with notmuch query filters, then return JSON summaries for review or paging.
Instructions
Search mail. Returns thread summaries as JSON. Query syntax is notmuch: from: to: subject: tag: folder: date:2026-01-01..2026-06-30, combined with and/or/not.
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": {
"query": "<query>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many threads to return, newest first. Defaults to 50 when omitted. | |
| query | Yes | notmuch query, for example from:alice@example.com and date:2026-01-01..2026-06-30. Terms: from: to: subject: tag: folder: attachment: date:, combined with and/or/not. A bare word matches anywhere in the message. | |
| offset | No | How many threads to skip before returning results, for paging through a large result set. Defaults to 0. | |
| account | No | Limit the search to one account, named as folders and status report it. Omit to search every account at once. | |
| include_excluded | No | Set true to also search the junk and trash folders, which are left out by default. Use it only when a message is expected to be there, since mail in those folders is more likely to be hostile. |