Skip to main content
Glama
mail-mcp-server

mail-mcp-server

listMessages

listMessages
Read-onlyIdempotent

Browse locally indexed messages in one folder, newest first, with optional date filters. Returns message cards without bodies so you can choose what to open next.

Instructions

Browse locally indexed messages in one folder, newest first, optionally within a date range. Undated messages come last without date bounds and are excluded with bounds. For keyword search use search; for a date range across all folders use search without query.

Returns cards without bodies. Choose from the cards before opening anything: pass a chosen card's key and the same connection to getMessage to read it, or to getThread for its conversation. Every stored copy counts separately here; search and getThread group recognized copies. read/flagged describe the last sync observation.

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": {
      "connection": "<connection>",
      "folder": "<folder>"
    },
    "name": "listMessages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoResults per page: 1 to 200, default 50; larger values are capped at 200
sinceNoInclude messages at or after this date/time, using the message Date header, not receipt or download time. Format: YYYY-MM-DD (UTC midnight), or ISO-8601 with Z or an offset, e.g. 2026-10-01T09:00:00+03:00; at most 3 fractional second digits. Messages without a date are excluded
untilNoInclude messages strictly before this date/time; same header and format as since. To include a whole day, use the following day's midnight. Must be later than since when both are given. Messages without a date are excluded
folderYesOne folder key from listFolders in this connection, not its display name
offsetNoDefault 0. For the next page, repeat the same arguments and use the previous nextOffset. Stop when there is no nextOffset
connectionYesConnection name from listConnections

Output Schema

NameRequiredDescriptionDefault
sinceNoApplied since bound, in UTC.
totalYesMessages in the folder within the date bounds.
untilNoApplied until bound, in UTC.
folderYesFolder key.
offsetYesPosition of this page.
messagesYesMessages, newest first; undated last.
connectionYesConnection name.
nextOffsetNoPass as offset to get the next page; absent at the end.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world, but the description adds genuinely non-obvious behavior: cards come back without bodies, duplicate stored copies are counted separately here while search and getThread group them, undated messages sort last with no bounds and are excluded with bounds, and read/flagged reflect the last sync observation. That is real context an agent could not infer. Minor gap: no statement about pagination limits beyond what the schema documents.

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-loaded with the core action, then exclusions and alternatives, with no filler sentences. Some phrasing is compressed to the point of terseness ('search without query', 'Every stored copy counts separately here'), which costs a little readability but not correctness.

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?

An output schema exists, so return shape needn't be described, yet the description still flags that results are bodyless cards and how to follow up with getMessage/getThread. Combined with dedup semantics and date-bound edge cases, nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so limit, offset, since, until, folder and connection are already documented with formats and constraints. The description adds only the undated-message edge case across date bounds and the connection/key pairing needed to hand a card to getMessage, which is useful but marginal against a fully annotated schema. Baseline 3 applies.

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?

States a specific verb and resource ('Browse locally indexed messages in one folder'), plus scope and ordering ('newest first', optional date range). It explicitly separates itself from sibling 'search' by keyword vs. browse, so an agent can pick correctly without opening schemas.

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

Usage Guidelines5/5

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

Gives explicit routing: keyword lookup goes to search, a cross-folder date range goes to search without a query, and reading a chosen item goes to getMessage or getThread. It also prescribes a workflow ('choose from the cards before opening anything') rather than leaving the choice implicit.

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