Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

List messages

list_messages
Read-onlyIdempotent

List email messages in a Proton Mail folder newest first, returning subject, sender, date, flags and total, with cursor-based paging for additional pages.

Instructions

List messages in a folder, newest first by date. Returns subject, sender (recipient for mail the account sent to others), date and flags for each message, and the folder's total. A non-selectable namespace container (e.g. Folders/Labels) is rejected with an actionable error rather than returning an empty list.

Paging: when there are more messages the result ends with a cursor value; pass it back unchanged to get the next page. Pages follow date order exactly, with nothing skipped or repeated. (UID order is not date order on Proton Bridge, which is why paging is not by UID.)

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": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of messages to return (default: 20, max: 100)
cursorNoContinue from a previous page: pass the `cursor` value that page ended with, unchanged.
folderNoFolder path to list messages from (default: INBOX)INBOX
beforeUidNoOnly messages with a UID below this value. With `sortByUid: true` this is how to page (the result names the next value); in date order use `cursor` instead.
sortByUidNoOrder by UID descending instead of by date, and page with `beforeUid`. UIDs reflect when a message was added to this folder, which on Proton Bridge is unrelated to its date, so this is rarely what you want. Default false (date order).
includeSnippetNoAppend a ~200-char body preview to each row. Adds one fetch per message; default off.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / beforeUid / description
      Previous value: -"Fetch messages with UIDs before this value (for pagination). Pass the smallest UID from the previous page."New value: +"Only messages with a UID below this value. With `sortByUid: true` this is how to page (the result names the next value); in date order use `cursor` instead."
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Continue from a previous page: pass the `cursor` value that page ended with, unchanged.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • changedInput schema / properties / sortByUid / description
      Previous value: -"Order by UID descending (arrival order, newest first) instead of by date. Makes `beforeUid` pagination exact — no skips or duplicates at page boundaries, even in All Mail or folders with moved messages. Default false (date sort)."New value: +"Order by UID descending instead of by date, and page with `beforeUid`. UIDs reflect when a message was added to this folder, which on Proton Bridge is unrelated to its date, so this is rarely what you want. Default false (date order)."
  2. First observedv1.0.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world, so the safety profile is covered. The description still adds substantive behavior beyond that: exact result shape and folder total, date-order paging with no skips or repeats, the Proton Bridge UID-vs-date caveat, and rejection of namespace containers with an actionable error. That is meaningful extra disclosure, though return payload details remain partial.

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?

Front-loads the core behavior, then a clearly labeled Paging section, with each sentence carrying information (ordering, guarantees, and the UID rationale). The Proton Bridge parenthetical is justified because it explains a non-obvious design choice, though the prose is slightly denser than needed.

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?

Covers the essentials for a read-only listing tool with no output schema: what comes back, how totals are reported, and how to continue paging. Minor gaps remain around missing-folder errors and the exact shape of the returned `cursor`/flag fields, but nothing that would cause a mis-call.

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 baseline is 3; the description earns above baseline by explaining the beforeUid/sortByUid interaction, why cursor paging is preferred in date order, and the per-message fetch cost of includeSnippet. It clarifies meaning rather than restating parameter 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?

States a specific verb and resource ("List messages in a folder"), plus the ordering ("newest first by date") and the fields returned. It does not name a sibling such as search_messages or count_messages, so an agent must infer the boundary between listing and searching from the folder scope alone.

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?

Gives clear operational context: paging via cursor, when to prefer beforeUid with sortByUid, and an explicit warning that sortByUid is "rarely what you want." It stops short of stating when to reach for search_messages instead of listing a whole folder, so the sibling boundary is left implicit.

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