Skip to main content
Glama
sethbang

proton-mail-mcp

search_messages

Read-onlyIdempotent

Search for email messages in any folder using filters like sender, subject, date, or read status; returns matching summaries sorted by newest first.

Instructions

Search for messages in a folder by various criteria (sender, subject, date, flags). Returns matching message summaries sorted by date (newest first). Note: recently sent or received messages may take a few seconds to become searchable by subject or body due to server-side indexing delays; searching by 'from' is typically immediate. A non-selectable namespace container (e.g. Folders/Labels) is rejected with an actionable error rather than returning no matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFolder to search in (default: INBOX)INBOX
fromNoFilter by sender email address or name
toNoFilter by recipient email address
subjectNoFilter by subject (substring match)
bodyNoFilter by body content (substring match)
sinceNoMessages since this date (YYYY-MM-DD, inclusive — includes messages on this date)
beforeNoMessages before this date (YYYY-MM-DD, exclusive — messages strictly before this date)
seenNoFilter by read status: true=read, false=unread
flaggedNoFilter by flagged/starred status
largerNoMatch messages larger than this many bytes
smallerNoMatch messages smaller than this many bytes
listIdNoFilter by List-Id header (substring match) — useful for newsletter cleanup
hasAttachmentNoMatch messages that have attachments. Approximation: sets a 5 KB size floor and post-filters by body structure. Capped at 500 candidates.
attachmentNameNoCase-insensitive substring filter on attachment filenames (e.g. "invoice", ".pdf"). Implies hasAttachment.
attachmentTypeNoCase-insensitive MIME-type prefix filter on attachments (e.g. "application/pdf", "image/"). Implies hasAttachment.
limitNoMaximum results to return (default: 20, max: 100)
includeSnippetNoAppend a ~200-char body preview to each row. Adds one fetch per message; default off.
Behavior5/5

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

The description adds valuable behavioral insights beyond the readOnlyHint and idempotentHint annotations: indexing delays for new messages, immediacy of 'from' searches, and error handling for non-selectable folders. This helps the agent understand non-obvious behaviors.

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 concise (four sentences) and front-loaded with the primary purpose. Each sentence serves a distinct role: purpose, output format, performance caveat, error behavior. No wasted words.

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 tool with 17 parameters and no output schema, the description covers key behaviors (indexing, errors, sorting) but does not explain filter combination logic (AND) or return structure details beyond 'summaries'. It is mostly complete but could explicitly state that multiple criteria are combined.

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 baseline is 3. The description does not significantly elaborate on parameters beyond the schema's own descriptions (e.g., 'Filter by sender email address or name'). The note about indexing delays relates to parameters but adds no new parameter-specific meaning.

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 clearly states the tool's purpose: 'Search for messages in a folder by various criteria'. It names the verb (Search), resource (messages), and provides context like sorting by date. This distinguishes it from sibling tools like list_messages (which lists all) and count_messages (which counts).

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?

The description lacks explicit guidance on when to use this tool versus alternatives (e.g., list_messages, count_messages). It does not contrast with siblings or state when filtering is appropriate. Users must infer usage from the listed criteria.

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/sethbang/proton-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server