Find mail attachments
mail_find_attachmentsSearch for attachments across multiple email messages using a notmuch query. Filter by file type to narrow results.
Instructions
Find attachments across a whole search, not just within one message.
Use this for questions like "all invoices from 2025" or "which PDFs
did I get from the accountant", where the attachment itself, not the
message, is what you are looking for. For a single message's
attachments, use mail_list_attachments instead. Note that notmuch's
own query syntax already supports 'attachment:*.pdf' and
'tag:attachment' inside query if you want to filter at the notmuch
level too.
Args:
query: A notmuch query selecting the messages to scan for attachments.
scope: Name of a configured scope to AND with query (see
mail_list_scopes). Defaults to the configured default scope.
type: Filter by 'pdf', 'image', 'doc' (office documents), or a raw
filename extension such as 'png' or 'xlsx'. Omit for no filter.
limit: Maximum number of attachment rows to return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| limit | No | ||
| query | Yes | ||
| scope | No |