list_emails_metadata
Retrieve email envelope metadata (subject, sender, recipients, dates, attachments, keywords) without exposing message content. Supports header-only scans for privacy-sensitive automation.
Instructions
Same as list_emails (lists emails from a mailbox, optionally filtered by mailboxId, with paging and sort) but returns ONLY metadata fields on each result — id, threadId, subject, from, to, replyTo, receivedAt, hasAttachment, keywords. Does NOT return preview or any body-derived content. Use in privacy-sensitive flows where the workflow needs only the envelope (e.g. customer-mail least-privilege scans, or any caller forbidden from ingesting message bodies). Pair with get_email_metadata for follow-up lookups that should also stay header-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of emails to return (default: 20) | |
| ascending | No | Sort oldest first instead of newest first (default: false) | |
| mailboxId | No | ID of the mailbox to list emails from (optional, defaults to all) |