Skip to main content
Glama
mhbxyz

protonmail-mcp

by mhbxyz

search_emails

Read-only

Find Proton Mail messages with combined filters for query, folder, sender, recipient, subject, date range, unread status, and attachments; results sorted newest first.

Instructions

Search messages, newest first. All filters combine with AND.

Args: query: Full-text across headers and body; empty matches everything. folder: Folder or label name to search in, as returned by list_folders. limit: Maximum number of messages to return (1-100). sender: Substring match on the From header. recipient: Substring match on the To header. subject: Substring match on the Subject header. since_days: Only messages received in the last N days. before_days: Only messages received before N days ago. unread_only: Only unread messages when true. has_attachment: Only messages carrying an attachment. IMAP cannot search on this, so up to 200 newest candidates are checked with BODYSTRUCTURE; the result reports how many were scanned and whether the set was truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
folderNoINBOX
senderNo
subjectNo
recipientNo
since_daysNo
before_daysNo
unread_onlyNo
has_attachmentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scannedNo
messagesNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses a non-obvious implementation constraint: IMAP cannot natively search attachments, so up to 200 newest candidates are probed via BODYSTRUCTURE and the result reports scanned/truncated counts. That is exactly the kind of caveat an agent needs to interpret partial results.

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?

Purpose and AND-combination rule are front-loaded in two short sentences, followed by a compact per-parameter list. Every line adds information; nothing is padded, and the attachment caveat is placed where it is relevant.

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?

With an output schema present, return values need not be described, and the description still notes that attachment searches report scan/truncation counts. Ten parameters at 0% schema coverage are all documented, so an agent has everything required to call the tool correctly.

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 carries the full burden and does so for all ten parameters: full-text scope for query, substring matching semantics for sender/recipient/subject, relative-window meaning for since_days/before_days, and boolean triggers for unread_only/has_attachment. This is meaningfully more than the schema provides.

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 and resource ("Search messages") plus an ordering guarantee ("newest first") and the AND semantics of filters. However, it never differentiates itself from the sibling search/list tools such as list_emails or get_thread, so the agent must infer which to choose.

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 description clarifies how filters combine (AND), that an empty query matches everything, and points to list_folders for valid folder names, which is real usage guidance. It offers no when-to-use/when-not guidance relative to list_emails or get_thread, so routing between siblings is left implied.

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