Skip to main content
Glama
your-mail-mcp

your-mail-mcp

search

Read-only

Locate email threads across IMAP accounts with notmuch query filters, then return JSON summaries for review or paging.

Instructions

Search mail. Returns thread summaries as JSON. Query syntax is notmuch: from: to: subject: tag: folder: date:2026-01-01..2026-06-30, combined with and/or/not.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many threads to return, newest first. Defaults to 50 when omitted.
queryYesnotmuch query, for example from:alice@example.com and date:2026-01-01..2026-06-30. Terms: from: to: subject: tag: folder: attachment: date:, combined with and/or/not. A bare word matches anywhere in the message.
offsetNoHow many threads to skip before returning results, for paging through a large result set. Defaults to 0.
accountNoLimit the search to one account, named as folders and status report it. Omit to search every account at once.
include_excludedNoSet true to also search the junk and trash folders, which are left out by default. Use it only when a message is expected to be there, since mail in those folders is more likely to be hostile.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • addedInput schema / properties / account / description
      Added value: +"Limit the search to one account, named as folders and status report it. Omit to search every account at once."
    • addedInput schema / properties / include_excluded / description
      Added value: +"Set true to also search the junk and trash folders, which are left out by default. Use it only when a message is expected to be there, since mail in those folders is more likely to be hostile."
    • addedInput schema / properties / limit / description
      Added value: +"How many threads to return, newest first. Defaults to 50 when omitted."
    • addedInput schema / properties / offset / description
      Added value: +"How many threads to skip before returning results, for paging through a large result set. Defaults to 0."
    • addedInput schema / properties / query / description
      Added value: +"notmuch query, for example from:alice@example.com and date:2026-01-01..2026-06-30. Terms: from: to: subject: tag: folder: attachment: date:, combined with and/or/not. A bare word matches anywhere in the message."
  2. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, non-destructive, closed-world). The description adds useful behavior beyond annotations by stating that results are thread summaries in JSON and by specifying the supported query language.

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?

Three compact sentences with no filler. The purpose, return shape, and query syntax are front-loaded and directly useful.

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

Completeness4/5

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

For a five-parameter read-only search tool with full schema coverage, the description supplies the essential return shape and query language. It stops short of workflow guidance such as using thread/show to expand a result, and does not describe summary fields, so it is not fully complete.

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

Parameters3/5

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

Schema coverage is 100%, and the schema already documents limit, offset, account, include_excluded, and the notmuch query syntax in detail. The description repeats the query syntax rather than adding new parameter meaning, so the baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb ('Search') and resource ('mail'), and adds the return type ('thread summaries as JSON'). It does not explicitly differentiate from siblings such as thread or show, but the summary-vs-detail distinction is reasonably implied.

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

Usage Guidelines3/5

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

The phrase 'Search mail' implies the general usage context, but there is no explicit when-to-use, when-not-to-use, or alternative such as thread/show for expanding results. The agent must infer routing from the sibling tool names.

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