Skip to main content
Glama

Email: List folder messages

email_list_folder_messages
Read-onlyIdempotent

List messages inside one exact folder. Especially for IMAP: list folders -> select folder.id -> list messages -> email.id -> read/action. Dates: after/before are ISO 8601 UTC datetimes (YYYY-MM-DDTHH:MM:SS.sssZ); for "today" use after=start of the user's day. Counting: an empty page is not "zero emails" unless no filter was applied; for totals use folder.total_count/unread_count from email_list_folders instead of listing. IMAP pages are capped at 50 live messages; keep limit small (20) to avoid runtime timeouts. 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. Email provider ID: Exact email ID returned by Nilyo/Unipile for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
fromNo
afterNo
limitNo
beforeNo
cursorNoOpaque pagination cursor returned by previous message listing.
any_emailNo
folder_idYesExact provider folder/label ID from email_list_folders/email_resolve_folder. Human folder names are not IDs. 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.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description reveals key behavioral traits: empty pages do not mean zero emails unless no filter is applied; IMAP pages are capped at 50 live messages; limiting to 20 avoids runtime timeouts; and IMAP email IDs change on move/update, so reuse the latest ID. These are essential for correct usage and go well beyond annotation defaults.

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 lengthy but every sentence provides actionable detail: workflow, date format, counting caveats, pagination limits, and ID handling. It is front-loaded with the core purpose and workflow, then deepens into edge cases. While it could be tightened, the density of useful information justifies its length; nothing is filler.

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 9-parameter tool with no output schema and low schema coverage, the description covers the most critical aspects: workflow, date semantics, counting, pagination limits, folder_id acquisition, and ID mutability. It does not explicitly explain to, from, any_email, or cursor, but those are simpler and likely self-evident or covered by schema descriptions. Overall, it provides sufficient context for an agent to call 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 coverage is only 33%, so the description carries the burden of explaining parameters. It specifies after/before as ISO 8601 UTC datetimes with a 'today' hint, advises a small limit (20) to avoid timeouts, and details how to obtain folder_id (via email_list_folders -> folder.id) and the distinction from human names. It also explains the email provider ID behavior for related tools, adding context that is not in the schema.

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 opens with a precise statement of the tool's function: 'List messages inside one exact folder.' It specifies the resource (folder) and the operation (list messages), and provides a concrete workflow (list folders -> select folder.id -> list messages -> email.id -> read/action). This clearly distinguishes it from siblings like email_list_messages (which likely lists across folders) and email_list_folders (which lists folders, not 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?

The description gives explicit when-to-use guidance: for listing messages in a specific folder after obtaining a folder ID via email_list_folders. It also tells when NOT to use it: for totals, use folder.total_count/unread_count from email_list_folders instead. It does not explicitly name email_list_messages as an alternative for cross-folder listings, but the folder-specific workflow implies the distinction. This is clear and practical.

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.