Skip to main content
Glama
hgn

Notmuch

by hgn

Find mail attachments

mail_find_attachments
Read-only

Search 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

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNo
queryYes
scopeNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explains that it scans messages using a notmuch query and supports filtering by type. While readOnlyHint is already in annotations, the description confirms read-only behavior by using 'find' and does not contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an introductory line, usage guidance, and parameter list. It's slightly verbose but every sentence provides value. Could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description does not specify the return format (e.g., fields for attachment rows). While the parameters are well-covered, the lack of output details is a gap for completeness, especially given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema coverage, the description thoroughly explains each parameter: query (notmuch query), scope (default scope context), type (filter examples like pdf, image, doc), and limit (max rows). This adds essential meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it finds attachments across a whole search, not just within one message, and distinguishes it from mail_list_attachments for single messages. The verb 'find' and resource 'attachments across a whole search' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage examples are given (e.g., 'all invoices from 2025') and it directs users to use mail_list_attachments for single-message attachments. This provides clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hgn/mcp-server-notmuch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server