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 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

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

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly/idempotent/non-destructive), and the description adds real operational context beyond them: IMAP pages capped at 50 live messages, keep limit ~20 to avoid timeouts, an empty page is not 'zero emails' without a filter, and IMAP IDs change on move/update. No auth or error-mode detail, but the added traits are genuinely useful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose well, but the long 'Email provider ID' block is verbose and partly duplicates guidance that matters more to read/move tools, and the folder ID text repeats the folder_id schema description verbatim. Information-dense but not tight.

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?

No output schema exists, yet the description explains that listing yields email.id and that totals must come from email_list_folders, plus IMAP page caps and cursor-based paging. For a 9-parameter tool with IMAP quirks this is nearly complete, with only the to/from/any_email semantics left uncovered.

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?

At 33% schema coverage the description must compensate. It documents after/before as ISO 8601 UTC datetimes with a 'today' hint, the limit constraint, and folder_id's exact-ID requirement. However to, from, and any_email have no description anywhere in either the schema or the text, leaving meaningful gaps.

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?

States a specific verb and resource with scope: 'List messages inside one exact folder.' The 'one exact folder' scoping distinguishes it from a broader message listing, but it never names the sibling email_list_messages, so the differentiation is inferred rather than explicit.

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?

Gives a concrete IMAP workflow (list folders -> select folder.id -> list messages -> email.id -> read/action) and a clear when-not: for totals use folder.total_count/unread_count from email_list_folders instead of listing. It stops short of explicitly contrasting with the email_list_messages sibling for cross-folder listing.

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.