Skip to main content
Glama
igorolv

mail-mcp-server

listMessages

listMessages
Read-onlyIdempotent

Browse messages in a single mail folder newest first, optionally within a date range, and return message cards without bodies for reading or thread lookup.

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. Pass a 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.

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.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: undated messages sort last without bounds but are excluded with bounds, results are cards without bodies, every stored copy is counted separately whereas search and getThread group recognized copies, and read/flagged reflect the last sync observation. These are non-obvious semantics that materially change how results should be interpreted.

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?

Four short sentences, front-loaded with what the tool returns and how it differs from search, then the follow-up path, then the subtle copy-counting nuance. No filler and no repetition of schema field descriptions.

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, yet the description still sketches the card shape and the read/flagged provenance, which is the right level. Between the description, the 100%-covered schema, and the annotations, an agent has everything needed to call it correctly and chain into getMessage/getThread.

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 baseline is 3; the description earns extra credit by adding cross-parameter behavior the schema does not state, namely the ordering and exclusion rule for undated messages at the since/until boundaries. It stops short of restating formats, which is appropriate since the schema already carries them.

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), the scope (one folder), the ordering (newest first), and the optional date filter. It also explicitly distinguishes itself from 'search' and from the card-reading tools getMessage/getThread, so an agent can route without opening sibling 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 when-to-use-elsewhere rules: 'For keyword search use search; for a date range across all folders use search without query.' It also names the follow-up path (pass a card's key plus the same connection to getMessage, or to getThread), which is exactly the alternative-selection guidance an agent needs.

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