list_mailboxes
List all mailboxes in your Fastmail account to view and manage your email folders, aiding in organization and navigation.
Instructions
List all mailboxes in the Fastmail account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:135-141 (registration)Tool 'list_mailboxes' is registered in the ListTools handler with its name, description, and empty input schema.
name: 'list_mailboxes', description: 'List all mailboxes in the Fastmail account', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:997-1007 (handler)The CallTool handler for 'list_mailboxes' calls client.getMailboxes() and returns the result as JSON.
case 'list_mailboxes': { const mailboxes = await client.getMailboxes(); return { content: [ { type: 'text', text: JSON.stringify(mailboxes, null, 2), }, ], }; } - src/jmap-client.ts:142-154 (helper)The JmapClient.getMailboxes() method sends a JMAP Mailbox/get request to the Fastmail API and returns the list of mailboxes.
async getMailboxes(): Promise<any[]> { const session = await this.getSession(); const request: JmapRequest = { using: ['urn:ietf:params:jmap:core', 'urn:ietf:params:jmap:mail'], methodCalls: [ ['Mailbox/get', { accountId: session.accountId }, 'mailboxes'] ] }; const response = await this.makeRequest(request); return this.getListResult(response, 0); } - src/index.ts:137-140 (schema)Input schema for list_mailboxes: empty object (no parameters required).
inputSchema: { type: 'object', properties: {}, },