Skip to main content
Glama
lobster-kit

mcp-server-lobstermail

by lobster-kit

get_email

Retrieve a specific email by ID with full body content formatted for LLM processing, using inbox and email identifiers.

Instructions

Get a single email by ID with full body in LLM-safe format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesInbox ID (e.g. ibx_...)
email_idYesEmail ID (e.g. eml_...)

Implementation Reference

  • src/index.ts:156-162 (registration)
    Registration of the get_email tool, including the schema.
    server.registerTool('get_email', {
      title: 'Get Email',
      description: 'Get a single email by ID with full body in LLM-safe format.',
      inputSchema: {
        inbox_id: z.string().describe('Inbox ID (e.g. ibx_...)'),
        email_id: z.string().describe('Email ID (e.g. eml_...)'),
      },
  • The handler implementation for the get_email tool, which fetches and formats the email content.
    }, async ({ inbox_id, email_id }) => {
      const inbox = await getInbox(inbox_id);
      const email = await inbox.getEmail(email_id);
    
      const parts: string[] = [
        `Email ID: ${email.id}`,
        `From: ${email.from}`,
        `To: ${email.to.join(', ')}`,
        `Subject: ${email.subject}`,
        `Date: ${email.createdAt}`,
        email.isInjectionRisk ? `⚠️ INJECTION RISK (score: ${email.security.injectionRiskScore})` : '',
        ``,
        email.safeBodyForLLM(),
      ];
    
      if (email.attachments && email.attachments.length > 0) {
        parts.push('', 'Attachments:');
        for (const att of email.attachments) {

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