Skip to main content
Glama

Get Emails

mail_get_emails
Read-onlyIdempotent

Retrieve emails with optional filters for unread, flagged, or date ranges, searching across all mailboxes and accounts. Use it to triage inboxes and review recent messages.

Instructions

Get emails with optional filtering. Each result includes the account, mailbox, and a body preview (~200 chars). Omit mailbox to search across all mailboxes and accounts. TRIAGE GUIDELINES: (1) Group results by account when presenting to the user. (2) Use the preview field to understand what each email is about — never guess from the subject line alone. (3) For any email you want to describe in detail, call mail_get_email first to read the full body. Returns newest first with pagination metadata. Use when: triaging inbox, reviewing recent messages

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": "mail_get_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax emails to return
filterNoFilter: all, unread, flagged, today, this_weekall
offsetNoNumber of results to skip for pagination
accountNoAccount name (e.g. 'iCloud'). Omit to search all accounts.
mailboxNoMailbox name (e.g. 'INBOX'). Omit to search all mailboxes across all accounts.
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable textjson

Output Schema

NameRequiredDescriptionDefault
countYes
itemsYes
totalYes
offsetYes
has_moreYes
next_offsetNo
truncation_messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the safety profile is fully covered structurally. The description adds genuinely useful behavior beyond that: results are newest-first, each carries a ~200-char body preview, pagination metadata is returned, and omitting mailbox widens scope across all mailboxes and accounts. It says nothing about rate limits, result caps beyond the schema maximum, or how large result sets behave, so the addition is real but partial.

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?

Opens with the purpose and scope, then scoping semantics, then guidance, then return shape — well front-loaded and readable. The three-item TRIAGE GUIDELINES block is arguably more agent-behavior instruction than tool definition and adds length, though each item is actionable rather than 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?

An output schema exists, so return values needn't be enumerated, and the description still flags the fields an agent must reason about (preview length, ordering, pagination). Combined with 100% schema coverage, the only remaining gap is how this differs from the search siblings, which matters for a mailbox with many list/search options.

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?

Schema description coverage is 100%, so all six parameters are already documented, and the description's cross-account scope note for the mailbox field largely restates the schema's "Omit to search all mailboxes across all accounts." No new syntax, formatting, or interaction detail (e.g. how limit/offset combine with filter) is added, so baseline 3 applies.

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 ("Get emails") with an explicit scope qualifier (optional filtering) and names mail_get_email as the detail-read sibling, which cleanly separates list from single-item retrieval. It does not distinguish itself from mail_search or mail_search_body, which are the closest conceptually adjacent siblings, so an agent must infer that boundary on its own.

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?

"Use when: triaging inbox, reviewing recent messages" gives clear positive trigger conditions, and the triage rule "call mail_get_email first to read the full body" explicitly routes deep-reading work to the alternative. No negative guidance or exclusion exists for mail_search/mail_search_body, so the when-not case is left implicit.

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