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

A4.2/5.0
Behavior4/5

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

Annotations already mark it read-only, open-world, and idempotent. The description adds that IMAP pages are capped at 50 and listed live, and that it's for finding email_id. It does not contradict annotations and adds useful behavioral detail beyond the structured 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?

Three sentences, front-loaded with purpose, then use cases and a pagination tip. No wasted words, well structured.

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 list tool with 6 optional parameters and no output schema, the description covers purpose, use cases, alternative for totals, and pagination behavior. It doesn't describe return format, but that's not required without an output schema. It's reasonably complete.

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 descriptions cover after, before, folder_id, and account_id (67% coverage). The description adds a hint to keep limit small (20) and implies cursor usage via the pagination mention. However, cursor and limit lack schema descriptions, so the description partially compensates but not fully.

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 clearly states it lists email messages from Gmail, Outlook, or IMAP, with a specific verb and resource. It also notes its utility for finding email_id before opening a message, distinguishing it from draft or folder-specific listers like email_list_drafts and email_list_folder_messages.

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?

It explicitly calls out that it's especially useful for IMAP mailboxes and cross-channel workflows, and directs to email_list_folders for totals. It also advises keeping limit small (20) for IMAP. This gives clear when-to-use context, though it doesn't explicitly contrast with email_list_folder_messages.

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.