Skip to main content
Glama
as-j

Fastmail MCP Server

by as-j

get_account_summary

Read-onlyIdempotent

Get aggregate mailbox statistics and a high-level status overview of your Fastmail account. Understand mailbox health and activity without reviewing individual emails.

Instructions

Get an overall Fastmail account summary with aggregate mailbox statistics. Use when the user wants a high-level status view of the mailbox rather than raw email lists. Do not use for message content or search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The case handler in the MCP server's CallToolRequestSchema switch statement that dispatches 'get_account_summary' to client.getAccountSummary() and returns the result as JSON text.
    case 'get_account_summary': {
      const summary = await client.getAccountSummary();
      return { content: [{ type: 'text', text: JSON.stringify(summary, null, 2) }] };
    }
  • Tool definition for 'get_account_summary' registered as a readTool with title 'Get Account Summary' and an empty input schema (no parameters required).
    readTool(
      'get_account_summary',
      'Get Account Summary',
      description(
        'Get an overall Fastmail account summary with aggregate mailbox statistics.',
        'Use when the user wants a high-level status view of the mailbox rather than raw email lists.',
        'Do not use for message content or search.',
      ),
      emptySchema,
    ),
  • Registration of 'get_account_summary' in the list of available email functions reported to the client.
    email: {
      available: true,
      functions: [
        'list_mailboxes', 'list_emails', 'get_email', 'send_email', 'create_draft', 'search_emails',
        'get_recent_emails', 'mark_email_read', 'delete_email', 'move_email',
        'get_email_attachments', 'download_attachment', 'advanced_search', 'get_thread',
        'get_mailbox_stats', 'get_account_summary', 'bulk_mark_read', 'bulk_move', 'bulk_delete',
        'add_labels', 'remove_labels', 'bulk_add_labels', 'bulk_remove_labels',
  • The actual business logic: fetches session, mailboxes, and identities; then aggregates totals (totalEmails, unreadEmails, totalThreads, unreadThreads) across all mailboxes and returns a summary with accountId, mailboxCount, identityCount, totals, and per-mailbox details.
    async getAccountSummary(): Promise<any> {
      const session = await this.getSession();
      const mailboxes = await this.getMailboxes();
      const identities = await this.getIdentities();
    
      // Calculate totals
      const totals = mailboxes.reduce((acc, mb) => ({
        totalEmails: acc.totalEmails + (mb.totalEmails || 0),
        unreadEmails: acc.unreadEmails + (mb.unreadEmails || 0),
        totalThreads: acc.totalThreads + (mb.totalThreads || 0),
        unreadThreads: acc.unreadThreads + (mb.unreadThreads || 0)
      }), { totalEmails: 0, unreadEmails: 0, totalThreads: 0, unreadThreads: 0 });
    
      return {
        accountId: session.accountId,
        mailboxCount: mailboxes.length,
        identityCount: identities.length,
        ...totals,
        mailboxes: mailboxes.map(mb => ({
          id: mb.id,
          name: mb.name,
          role: mb.role,
          totalEmails: mb.totalEmails || 0,
          unreadEmails: mb.unreadEmails || 0
        }))
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds 'aggregate mailbox statistics' and 'overall account summary', but does not disclose additional behavioral traits beyond what annotations provide. It does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, each carrying essential information: purpose, usage context, and exclusion. No redundant or irrelevant text, and the purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description adequately covers what the tool does and when to use it. However, it could be more complete by detailing the specific statistics returned (e.g., total messages, storage), though this is optional given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so the baseline is 4. The description adds no parameter-specific information, which is acceptable given the absence of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves an overall account summary with aggregate mailbox statistics. It distinguishes from siblings by noting it is for high-level views rather than raw email lists, but does not explicitly differentiate from the similar sibling tool 'get_mailbox_stats'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use ('high-level status view') and when-not-to-use ('not for message content or search'), implicitly referencing alternatives like list_emails and search_emails. However, it does not name specific sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/as-j/fastmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server