Skip to main content
Glama
hgn

Notmuch

by hgn

List mail addresses

mail_list_addresses
Read-only

Resolve a name or query into concrete email addresses, listing senders, recipients, or most-used senders by occurrence count. Use the returned addresses for reliable mail searches and counts.

Instructions

Resolve a name or query into the concrete email addresses behind it.

Searching from: directly is unreliable: it also matches mail that merely mentions the name in a display name (e.g. a share notification like "Kathrin Pietsch (via Google Keep) <keep-shares@ google.com>"), and a name can belong to more than one real address or person. Call this tool first whenever you only have a name, then search or count using the address(es) it returns.

Args: query: A notmuch query, typically a name fragment, e.g. 'kathrin'. scope: Name of a configured scope to AND with query (see mail_list_scopes). Defaults to the configured default scope. output: 'sender' (addresses this query's messages were From), 'recipients' (addresses in To/Cc/Bcc), or 'count' (sender addresses ranked by occurrence count, the way to find someone's most-used address among several). limit: Maximum number of addresses to return. Omit for all results (the default); set it only to cap the number returned, and when it truncates the total is still reported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
scopeNo
outputNosender
Behavior5/5

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

While annotations provide readOnlyHint=true, the description adds critical behavioral details: it explains that query is a notmuch query, describes the three output modes and their semantics, and discloses limit truncation behavior ('when it truncates the total is still reported'). It also surfaces a subtle pitfall about display-name matching, which goes well beyond annotation data.

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

Conciseness5/5

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

The description is compact and front-loaded with the core purpose, then usage rationale, then detailed parameters. Every sentence earns its place—there is no fluff or repetition. The Args block follows a consistent, scannable format, making the information easy to parse.

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

Completeness5/5

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

With four parameters and no output schema, the description covers all essential aspects: purpose, usage context, parameter semantics, and even edge-case behavior (unreliable direct matching, truncation reporting). It provides enough information for an agent to select and invoke the tool correctly without external docs.

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?

The input schema provides no descriptions (0% coverage), so the description carries the full burden. Each parameter receives thorough explanation: query with an example, scope with a reference to mail_list_scopes, output with explicit modes and meanings, and limit with default and truncation semantics. This fully compensates for the schema's silence.

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 opens with a clear, specific verb-resource pairing: 'Resolve a name or query into the concrete email addresses behind it.' It distinguishes itself from sibling tools by focusing on address resolution rather than message search, read, or count operations. The purpose is immediately understandable and not a tautology.

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?

The description explicitly tells the agent when to use this tool: 'Call this tool first whenever you only have a name, then search or count using the address(es) it returns.' It also warns against the unreliable alternative of using from:<name> directly in search, providing concrete when-not-to-use guidance and setting expectations for subsequent steps.

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