Skip to main content
Glama

Email: List messages

email_list_messages
Read-onlyIdempotent

List email messages from the user's connected Gmail, Microsoft/Outlook OR generic IMAP mailbox. This is especially useful for IMAP mailboxes not covered by native agent connectors, and for cross-channel workflows that combine email context with LinkedIn/WhatsApp/Instagram. Use to find email_id before opening a message. For totals use email_list_folders (folder.total_count); IMAP pages are capped at 50 and listed live, keep limit small (20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoISO 8601 UTC datetime; only emails after it (exclusive).
limitNo
beforeNoISO 8601 UTC datetime; only emails before it (exclusive).
cursorNo
folder_idNoExact folder/label ID returned by email_list_folders/email_resolve_folder. Never pass a human folder name unless the provider returned it as the ID. Mailbox folder/label ID: Exact Gmail label, Outlook folder or IMAP folder id. Obtain with: email_list_folders -> folder.id Never pass: human folder name such as Inbox when an ID is required.
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint safely. The description adds useful non-obvious behavior: IMAP pages are capped at 50, results are listed live, and the limit should be kept small. This is genuinely helpful context beyond the structured annotations.

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?

The description is relatively compact and front-loaded with the core purpose. It packs provider scope, use cases, pagination limits, and an alternative into a few sentences. The cross-channel phrasing is slightly verbose, but it still earns its place by explaining when the tool is helpful.

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?

For a read-only listing tool with no output schema, the description covers the essential decisions: provider scope, when to use, pagination caps, limit advice, and the alternative for totals. It could be more complete by explicitly describing the return shape or cursor-based pagination, but the core agent workflow (find email_id, then open the message) is supported.

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 67%, and the schema already documents after, before, folder_id, and account_id in detail. The description adds guidance for the limit parameter ('keep limit small (20)') and implies email_id appears in results. However, it does not clarify cursor semantics or add meaning for the undocumented limit/cursor parameters beyond what the schema provides.

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?

The description states a clear action and resource: 'List email messages from the user's connected Gmail, Microsoft/Outlook OR generic IMAP mailbox.' It also explains that the tool is used to find email_id before opening a message. However, it does not explicitly distinguish itself from the sibling email_list_folder_messages, so an agent may still be unsure which listing tool to choose.

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?

The description gives concrete usage context: it is especially useful for IMAP mailboxes not covered by native connectors and for cross-channel workflows. It also directs agents to email_list_folders for totals, which is a helpful alternative. It does not explicitly state when to choose email_list_folder_messages or email_list_drafts instead.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.