Skip to main content
Glama

get_emails

Retrieve emails from Apple Mail accounts with standard properties like subject, sender, and date. Specify account, mailbox, and limit to fetch sorted messages.

Instructions

Get emails from a mailbox.

Retrieves emails with standard properties: id, subject, sender, date_received, read status, and flagged status.

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 email dictionaries sorted by date (newest first).

Example: >>> get_emails("Work", "INBOX", limit=10) [{"subject": "Meeting tomorrow", "sender": "boss@work.com", ...}, ...]

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 the full burden. It discloses key behavioral traits: it retrieves emails with specific properties, uses environment variable defaults, sorts by date (newest first), and returns a list. However, it does not mention potential errors, rate limits, or authentication needs, leaving some gaps.

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?

The description is well-structured and appropriately sized: a brief purpose statement, details on properties and parameters, return format, and an example. Every sentence adds value without redundancy, and it is front-loaded with the core functionality.

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?

Given the tool's moderate complexity, no annotations, and an output schema (implied by 'Has output schema: true'), the description is largely complete. It covers purpose, parameters, returns, and an example. However, it could improve by addressing sibling tool differentiation or error handling, but the output schema likely handles return values adequately.

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 description coverage is 0%, so the description must compensate. It fully explains all three parameters (account, mailbox, limit) with semantics, default values, and usage context (e.g., env var fallbacks). This adds significant value beyond the bare schema, making parameters clear and actionable.

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?

The description clearly states the tool's purpose: 'Get emails from a mailbox' with specific verb ('Get') and resource ('emails'). It distinguishes from siblings like 'get_flagged_emails' or 'get_unread_emails' by indicating it retrieves emails with standard properties, though it could be more explicit about the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying default behaviors (e.g., using environment variables or defaults for account/mailbox) and the limit parameter, but does not explicitly state when to use this tool versus alternatives like 'search_emails' or 'get_todays_emails'. It provides context but lacks explicit guidance on tool selection.

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