Skip to main content
Glama
lobster-kit

mcp-server-lobstermail

by lobster-kit

check_inbox

List recent emails in a LobsterMail inbox to view sender, subject, and preview content for monitoring or processing messages.

Instructions

List recent emails in an inbox. Returns sender, subject, and preview for each email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesInbox ID (e.g. ibx_...)
limitNoMax emails to return (default: 20)
sinceNoOnly emails after this ISO 8601 timestamp

Implementation Reference

  • Implementation of the 'check_inbox' MCP tool, which lists recent emails in an inbox.
    server.registerTool('check_inbox', {
      title: 'Check Inbox',
      description: 'List recent emails in an inbox. Returns sender, subject, and preview for each email.',
      inputSchema: {
        inbox_id: z.string().describe('Inbox ID (e.g. ibx_...)'),
        limit: z.number().optional().describe('Max emails to return (default: 20)'),
        since: z.string().optional().describe('Only emails after this ISO 8601 timestamp'),
      },
    }, async ({ inbox_id, limit, since }) => {
      const inbox = await getInbox(inbox_id);
      const emails = await inbox.receive({ limit, since });
    
      if (emails.length === 0) {
        return { content: [{ type: 'text' as const, text: 'No emails found in this inbox.' }] };
      }
    
      const lines = emails.map(
        (e) =>
          `- [${e.id}] From: ${e.from} | Subject: ${e.subject} | ${e.createdAt}` +
          (e.isInjectionRisk ? ' ⚠️ INJECTION RISK' : ''),
      );
    
      return {
        content: [
          {
            type: 'text' as const,
            text: `${emails.length} email(s) found:\n\n${lines.join('\n')}\n\nUse get_email with an email_id to read the full body.`,
          },
        ],
      };
    });

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/lobster-kit/mcp-server-lobstermail'

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