list-accounts
Get configured Apple Mail account names (e.g., iCloud, Gmail) to pass exact names to other tools. Returns account list and count, or an error when Mail is inaccessible.
Instructions
Use when: discovering the configured Mail accounts (e.g. iCloud, Gmail) so you can pass an exact account name to other tools. Returns: the account names and a count. If the AppleScript transport fails (timeout / wedged Mail / missing Automation grant) this returns an ERROR rather than an empty list — an empty list always means Mail really has no accounts. Do not use when: you want the folders within an account (use list-mailboxes) or messages (use list-messages / search-messages).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| error | No | ||
| partial | No | ||
| accounts | No |