MCP server for searching and reading mail from IMAP accounts via notmuch indexing
The server defines 11 mail-specific tools with generally clear purposes, but exhibits significant issues in schema visibility, output documentation, and error handling guidance. All tool definitions appear in test files (e2e_test.go, live_test.go, mcp.go) with input schemas visible, but output schemas are completely absent from the source code provided. Parameter descriptions are concrete and domain-appropriate (e.g., 'notmuch query' syntax, MIME part numbers), but lack validation details (ranges, constraints). Tool names follow verb_noun convention ('count', 'search', 'show', 'thread', 'text', 'attach') but several are generic action words ('show', 'text') that lack object clarity. Error handling and recovery guidance are not evident in the code sample. The server is read-only except for 'refresh' (WRITE), which is appropriately risk-categorized but lacks confirmation/dry-run patterns. Schema completeness is weak: while input parameters have type and description, return types are undocumented.
Return a message attachment by its notmuch ID and MIME part number
Count messages matching a notmuch query
Return maildir paths of messages matching a notmuch query
List all folders in the configured accounts and their sync status
Return message IDs matching a notmuch query
Synchronize one account or all accounts with their IMAP servers and reindex
Search for messages matching a notmuch query and return thread summaries
Output schemas completely absent. No documentation of return types, structures, or field meanings for any of the 11 tools. This forces LLMs to guess at response structure and prevents reliable chaining between tools.
Tool names lack object clarity. 'show', 'text', 'thread', 'attach' omit what they operate on ('message_id' should be in name or description, e.g., 'show_message', 'extract_text'). Generic verbs increase LLM disambiguation overhead.
No error handling guidance or recovery instructions visible. If a notmuch query is invalid, a message ID not found, or MIME part doesn't exist, the LLM has no guidance on what to do next.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 50 | <=2025-11-25 | v2 |
Render a message by its notmuch ID
Report the sync status of all configured accounts
Return the plaintext of a message, converting HTML to text
Return the thread containing a notmuch message ID
Parameter validation constraints missing. 'limit' and 'offset' parameters in 'search' and 'show' lack min/max bounds. No enum constraints on 'account' (valid account names) or 'query' (notmuch syntax guide). LLMs will pass invalid values.
Destructive tool ('refresh' with WRITE risk) lacks confirmation/dry-run pattern. No sign that the agent must confirm before syncing accounts. Runaway agents could trigger unwanted IMAP operations.
Parameter 'query' description repeats notmuch syntax across 6+ tools. No DRY principle, documentation bloat. Also no guidance on operator precedence, escaping, or common pitfalls.
'attach' tool requires 'sig' parameter (HMAC signature) only when PUBLIC_URL is set. Conditional parameter logic undocumented in the descriptions provided. LLMs may omit 'sig' when required or include it when not needed.