Skip to main content
Glama
proton-mcp

proton-mcp

by RndmJoker

Search messages

search_messages
Read-only

Search Proton Mail messages by text, subject, sender, recipient, date range, read state, star, or size; require at least one criterion and return matching headers newest first with paging.

Instructions

Searches a mailbox by text, subject, sender, recipient, date range, read state, star or size. At least one criterion is required. Returns headers only, newest first across pages, with paging. A full-text search walks the local database of the Bridge and takes a few seconds on a large mailbox, while criteria such as unread or date are fast. Subject, sender and recipient are compared by this server against the decoded headers, so umlauts and spaces match as written, in any case; without a date range that reads the headers of the whole mailbox, at most the 20000 most recently added, and the answer says when that limit was reached. Full text cannot reach attachments or parts sent as base64, which the answer says as well. Searching "All Mail" covers every mailbox including trash, and entries that are in the trash are marked "in trash" - the other marks are flags rather than places, so "draft" says a message is one, not that it is in Drafts.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoSubstring of a recipient address.
fromNoSubstring of the sender address or display name.
textNoFree text, matched against body and headers. This is the slow criterion.
limitNoHow many results to return.
sinceNoOnly messages the sender dated on or after this day, as YYYY-MM-DD. Compared against the Date header, which is what the results show.
beforeNoOnly messages the sender dated before this day, as YYYY-MM-DD. Compared against the Date header, which is what the results show.
offsetNoHow many results to skip, for paging.
mailboxNoWhich mailbox to search. Defaults to "All Mail", which holds every message, discarded ones included. Those come back marked "in trash".All Mail
subjectNoSubstring of the subject.
largerThanNoMinimum size in bytes. Useful for finding messages with large attachments.
unreadOnlyNoWhen true, only unread messages. False and omitted both mean no filter.
starredOnlyNoWhen true, only starred messages. False and omitted both mean no filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.11
    • changedInput schema / properties / before / description
      Previous value: -"Only messages before this date, as YYYY-MM-DD."New value: +"Only messages the sender dated before this day, as YYYY-MM-DD. Compared against the Date header, which is what the results show."
    • changedInput schema / properties / mailbox / description
      Previous value: -"Which mailbox to search. Defaults to \"All Mail\", which holds every message."New value: +"Which mailbox to search. Defaults to \"All Mail\", which holds every message, discarded ones included. Those come back marked \"in trash\"."
    • changedInput schema / properties / since / description
      Previous value: -"Only messages on or after this date, as YYYY-MM-DD."New value: +"Only messages the sender dated on or after this day, as YYYY-MM-DD. Compared against the Date header, which is what the results show."
    • changedInput schema / properties / starredOnly / description
      Previous value: -"When true, only starred messages."New value: +"When true, only starred messages. False and omitted both mean no filter."
    • changedInput schema / properties / unreadOnly / description
      Previous value: -"When true, only unread messages."New value: +"When true, only unread messages. False and omitted both mean no filter."
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint=false, but the description adds substantial behavior beyond them: headers-only results ordered newest first with paging, a scan cap of 'at most the 20000 most recently added' that is self-disclosed in the response, a note that full text cannot reach attachments or base64 parts, and the trash-flag semantics. These are exactly the caveats an agent needs to interpret results correctly.

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?

Content is front-loaded — purpose, precondition, return shape, and performance come first, with edge cases after. The middle section is a dense run-on spanning performance, header decoding, the 20000 cap, and base64 limits in a single breath, and the closing sentence about flags versus places is convoluted. Every clause is informative, but readability suffers from packing.

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 12 parameters, no output schema, and no annotations about mutation or safety, the description carries the full burden and does: it explains what comes back (headers, newest first, paged), how to page, the performance profile, the scan cap and its disclosure, and the trash/flag labeling. Nothing essential to calling or interpreting the tool is left unstated.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each field, but the description adds cross-cutting semantics the schema lacks: subject/sender/recipient are matched against decoded headers, case-insensitively, with umlauts and spaces matching as written, and it restates which criterion is slow. The trash-vs-flag distinction for 'draft' further clarifies filter 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 opens with a specific verb and resource ('Searches a mailbox') and enumerates the searchable criteria (text, subject, sender, recipient, date range, read state, star, size), then states the return shape ('headers only, newest first'). This is clearly distinguishable from siblings like list_messages or get_message without opening the schema.

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

Usage Guidelines4/5

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

It gives a hard precondition ('At least one criterion is required') and tells the agent when to prefer which criterion ('A full-text search ... takes a few seconds ... while criteria such as unread or date are fast'). It also clarifies the mailbox choice and what All Mail includes. It never names a sibling alternative for the browse-without-criteria case, so explicit routing guidance is missing.

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