Skip to main content
Glama

get_unread_emails

Retrieve unread emails from specified mailboxes using the JXA Mail MCP server. Configure account, mailbox, and limit parameters to fetch messages sorted by date.

Instructions

Get unread emails from a mailbox.

Args: account: Account name. Uses JXA_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. mailbox: Mailbox name. Uses JXA_MAIL_DEFAULT_MAILBOX env var or "Inbox" if not specified. limit: Maximum number of emails to return (default: 50)

Returns: List of unread emails sorted by date (newest first).

Example: >>> get_unread_emails("Work", limit=20) [{"subject": "New message", "read": false, ...}, ...]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo
mailboxNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it's a read operation (implied by 'Get'), describes sorting behavior ('sorted by date newest first'), mentions environment variable fallbacks, and provides a concrete return example. However, it doesn't mention rate limits, authentication needs, or error conditions.

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?

Perfectly structured with clear sections: purpose statement, Args with detailed explanations, Returns specification, and Example. Every sentence adds value, with no wasted words. The information is front-loaded and efficiently organized.

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

Completeness5/5

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

Given the tool's moderate complexity, no annotations, and the presence of an output schema, the description provides excellent completeness. It covers purpose, all parameters with their semantics and defaults, return format, sorting behavior, and includes a practical example. The output schema handles return value details, so the description focuses on operational context.

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?

With 0% schema description coverage, the description fully compensates by explaining all three parameters in detail: account (with env var fallback logic), mailbox (with env var and default logic), and limit (with default value). The Args section adds substantial meaning beyond the bare 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 clearly states the specific action ('Get unread emails') and resource ('from a mailbox'), distinguishing it from siblings like get_emails (all emails) or get_flagged_emails (different filter). The verb+resource combination is precise and unambiguous.

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 implies usage context through the 'unread' filter and default behaviors, but doesn't explicitly state when to use this tool versus alternatives like search_emails or get_todays_emails. It provides clear default values and environment variable fallbacks, giving practical guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/imdinu/jxa-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server