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 m365_list_emails / m365_search_emails (listed once a Microsoft 365 account is connected) 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). Each entry's permissions carries only the permissions this service has (read, send, write; a key that is missing does not apply). true: allowed in the account's boxes (LMCP's icon → My apps → open the app's row → the account's Read · Send · Write) and the item accepts it. false: turned off there, or the item is read-only (read_only: true).
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 |