Skip to main content
Glama

list_mail_messages

Read-onlyIdempotent

List email messages in a mailbox, newest first, returning summaries of subject, sender, and date without full bodies. Paginate to fetch older messages.

Instructions

List messages in a mailbox, newest first.

Returns message summaries (subject, sender, date, flags, tags) without the full body. Use get_mail_message with a message ID to read the full content.

Args: mailbox_id: The mailbox database ID. Use list_mailboxes to find it. limit: Maximum number of messages to return (1-100, default 20). cursor: Pagination cursor. Pass the smallest message ID from a previous response to fetch older messages.

Returns: JSON object with "data" (list of message summaries) and "pagination" metadata. Each message has: id, subject, date (unix timestamp), from, to, flags, preview, and tags (display_name and imap_label) when it has any.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
cursorNo
mailbox_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description goes further by disclosing ordering behavior ('newest first'), that full bodies are omitted, and how pagination works ('Pass the smallest message ID from a previous response to fetch older messages'). These are useful behavioral details beyond the structured annotation hints.

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?

The description is tightly organized: a one-line summary, a short clarification of return scope, clear Arg sections, and a Returns section. Every sentence adds value and there is no redundant or filler content.

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?

For a list operation with three parameters stubby, the description covers identification of the mailbox, limits, pagination, output shape, and the relationship to sibling tools. Combined with the read-only annotations and output schema, an agent has everything needed to invoke and interpret 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 full responsibility for parameter semantics. It explains mailbox_id as the mailbox database ID obtainable via list_mailboxes, limit as maximum count with a range and default, and cursor with a concrete usage pattern for fetching older messages. No parameter is left unexplained.

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 begins with a specific verb and resource: 'List messages in a mailbox, newest first.' It clearly distinguishes this tool from its sibling get_mail_message by noting it returns summaries without full bodies, and from list_mailboxes by specifying the mailbox_id source. The purpose is immediately actionable.

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?

The description explicitly instructs when to use get_mail_message instead ('Use get_mail_message with a message ID to read the full content') and tells the agent to use list_mailboxes to obtain the required mailbox_id. It also explains pagination usage with cursor, giving clear operational guidance for calling this tool correctly.

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

Deploy Server

Other Tools