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. Use for a requested mailbox listing or to obtain email context for a cross-channel task. 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).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "email_list_messages"
  }
}

Input 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 readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description earns credit for behavioral detail beyond them: IMAP results are live and capped at 50 per page, and callers should keep limit small to avoid heavy fetches. It says nothing about pagination or cursor expiry behavior.

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?

Four tight sentences, front-loaded with purpose, then usage, then the practical limit warning; nothing is redundant. Slight density (three alternatives crammed into sentence two) keeps it from being maximally clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only list tool with strong annotations this covers invocation well, and 'find email_id' hints at the return key. With no output schema, however, the description never says what a listed message contains (subject, sender, snippet, thread id) or how cursor paging terminates, leaving the response contract underspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

At 67% schema coverage, the schema already documents after, before, folder_id and account_id in detail. The description adds real meaning for 'limit' — IMAP caps pages at 50 even though the schema allows 100 — plus a practical recommended value of 20, which is information the schema does not contain.

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?

"List email messages from the user's connected Gmail, Microsoft/Outlook OR generic IMAP mailbox" gives a specific verb, resource and provider scope. It does not differentiate against the very similar sibling email_list_folder_messages, so an agent must still infer which listing tool to pick.

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 states concrete use cases (user-requested listing, cross-channel context, finding email_id before opening a message) and names an alternative for totals: email_list_folders with folder.total_count. It also warns that IMAP pages are capped at 50 and to keep limit small (20). Missing only an explicit 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.