List Accounts
list_accountsLists Mail.app email accounts WITH each account's email addresses, server_name and type. type is whatever Mail reports — imap | pop | iCloud | smtp | unknown — and Mail's scripting dictionary has NO Exchange value, so Exchange (EWS) accounts always come back as unknown, flagged with type_undetermined: true and a type_note; for those read the mailbox through the m365_* tools (or outlook_diagnose) instead of routing by type. Slower — queries Mail directly. For just the account NAMES (to pass to list_emails(account=...)), prefer list_email_accounts: it's faster (cached, no Mail lock).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present when some account's type could not be determined: how many, and what to do. | |
| count | Yes | ||
| accounts | Yes |