Skip to main content
Glama
mail-mcp

mail-mcp

by honest-magic

search_emails

Read-only

Find emails in any IMAP account by filtering sender, subject, date, folder, or body keywords, including Gmail, Outlook, and custom domains.

Instructions

Search emails via IMAP — works with any provider (Gmail, Outlook, custom domains). Filter by sender, subject, date, or keywords.

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": {
      "accountId": "<accountId>"
    },
    "name": "search_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoFilter by sender
countNoThe number of emails to retrieve (default: 10)
sinceNoFilter by date (ISO format)
beforeNoFilter by date (ISO format)
folderNoThe folder to search in (default: INBOX)
offsetNoNumber of messages to skip from the newest (for pagination, default: 0)
subjectNoFilter by subject
keywordsNoFilter by keywords in body
accountIdYesThe ID of the account to use

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

B3.2/5.0
Behavior3/5

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

With readOnlyHint=true and destructiveHint=false already declared, the safety profile is covered. The description adds genuinely useful context that the tool is provider-agnostic (works with any IMAP backend), but it says nothing about result ordering, what fields come back, or rate/connection limits.

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?

Two short clauses, front-loaded with the verb and scope, with no filler. The second clause largely duplicates what the schema parameters already state, which is mild redundancy given full schema coverage.

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?

For a nine-parameter read tool with no output schema, the definition covers the input side adequately through the schema but leaves the return shape unaddressed — an agent cannot tell whether it gets headers, snippets, or full bodies, or how results are ordered relative to offset.

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 description coverage is 100%, so all nine parameters are already documented, including defaults for count, folder, and offset. The description merely restates the filter dimensions (sender, subject, date, keywords) without adding semantics such as how since/before interact or how keywords match body text.

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?

The description states a specific verb and resource ('Search emails') plus the transport ('via IMAP') and provider breadth (Gmail, Outlook, custom domains). It does not, however, differentiate itself from the sibling list_emails, so an agent must infer which listing tool to pick.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. The filter list hints that this is for criteria-based retrieval, but the definition never says to prefer it over list_emails or read_email, nor does it state prerequisites beyond the required accountId.

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