list_identities
Retrieve all Fastmail sending identities and aliases to select the correct sender address before composing or sending an email. Ensures only allowed from addresses are used.
Instructions
List Fastmail sending identities that can be used in the from field. Use before send_email, save_draft, or create_draft when the user wants to send from an alias or confirm which sender addresses are allowed. Do not use for inbox or message retrieval.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.ts:277-279 (handler)Handler for 'list_identities' tool — calls client.getIdentities() and returns the result as JSON text.
case 'list_identities': { const identities = await client.getIdentities(); return { content: [{ type: 'text', text: JSON.stringify(identities, null, 2) }] }; - src/jmap-client.ts:264-278 (helper)Helper function getIdentities() in the JMAP client — makes an Identity/get JMAP call to fetch sending identities.
async getIdentities(): Promise<any[]> { const session = await this.getSession(); const request: JmapRequest = { using: ['urn:ietf:params:jmap:core', 'urn:ietf:params:jmap:submission'], methodCalls: [ ['Identity/get', { accountId: session.accountId }, 'identities'] ] }; const response = await this.makeRequest(request); return this.getListResult(response, 0); } - src/tool-definitions.ts:394-402 (schema)Schema definition for 'list_identities' tool — no input parameters (emptySchema), returns list of sending identities.
'list_identities', 'List Sending Identities', description( 'List Fastmail sending identities that can be used in the from field.', 'Use before send_email, save_draft, or create_draft when the user wants to send from an alias or confirm which sender addresses are allowed.', 'Do not use for inbox or message retrieval.', ), emptySchema, ), - src/mcp-server.ts:420-423 (registration)Registration of 'list_identities' in the capabilities/availability listing under 'identity' functions.
identity: { available: true, functions: ['list_identities'], },