Skip to main content
Glama
hgn

Notmuch

by hgn

Pending mail

mail_pending
Read-only

Find emails needing your reply or awaiting responses from others, sorted by age to prioritize overdue threads.

Instructions

Threads that need attention: mail owed by you, or mail you are waiting on.

direction='owed': threads matching scope that no message has ever been tagged 'replied' on, i.e. mail you have not answered. Use this for "what do I still need to reply to".

direction='waiting': threads where your own address sent the most recent message and nobody has responded since. Use this for "who owes ME a reply". Needs at least one address configured under [identity] addresses in the config (normally defaulted automatically from notmuch's own user.primary_email/user.other_email); without that, this direction raises an actionable error rather than guessing.

Both directions sort oldest (most overdue) first, since age is the point. This is not a substitute for mail_search when you want to see the messages themselves, only for triaging what is outstanding.

Args: direction: 'owed' (you have not replied) or 'waiting' (you are waiting on a reply). older_than: Only include threads whose relevant date is at least this old, e.g. '14d', '2w', '3m', '1y'. Omit for no age floor. scope: Name of a configured scope to restrict the search (see mail_list_scopes). Defaults to the configured default scope. limit: Maximum number of threads 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
scopeNo
directionNoowed
older_thanNo
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safe-read nature is covered. The description adds valuable behavioral context: both directions sort oldest first because 'age is the point', the 'waiting' direction requires identity addresses and raises an actionable error if missing, and the limit parameter still reports the total when truncating. This is strong supplementary transparency beyond the annotations.

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 organized into clear paragraphs and an Args section. Every sentence earns its place: both directions are explained with use cases, sorting is justified, the config dependency for 'waiting' is disclosed, and the relationship to mail_search is stated. It is thorough but not bloated, with no redundant phrasing.

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?

Given the tool's complexity (two directions, config dependency, sorting, and four parameters with nuances), the description is fully complete. It covers return-ordering behavior, error conditions, parameter semantics, and when to use alternatives. Although there is no output schema, the description notes that the total is reported even when truncating, which addresses response expectations.

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?

Schema description coverage is 0%, so the description must carry the full burden, and it does. Every parameter is explained with concrete examples: direction lists values and meaning, older_than gives formats like '14d', scope references mail_list_scopes for configuration, and limit explains its default and truncation behavior. This fully compensates for the schema's lack of descriptions.

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 'Threads that need attention: mail owed by you, or mail you are waiting on,' which specifies the exact verb (list threads needing attention) and resource (mail threads). It differentiates from the sibling mail_search by explicitly stating 'This is not a substitute for mail_search when you want to see the messages themselves,' making its purpose unmistakable.

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 provides explicit usage scenarios: direction='owed' is for 'what do I still need to reply to' and direction='waiting' for 'who owes ME a reply'. It also names the sibling alternative (mail_search) and explains when not to use this tool, saying it is only for triaging outstanding mail, not for viewing messages.

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