Skip to main content
Glama
lobster-kit

mcp-server-lobstermail

by lobster-kit

get_thread

Retrieve a complete email conversation thread in chronological order, showing sender, subject, and preview for each message to understand the full communication flow.

Instructions

Get a conversation thread with all its emails in chronological order. Shows the full conversation flow including sender, subject, and preview for each email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesInbox ID (e.g. ibx_...)
thread_idYesThread ID (e.g. thd_...)

Implementation Reference

  • The handler function for 'get_thread' that retrieves the thread using an inbox object and formats the output.
    }, async ({ inbox_id, thread_id }) => {
      const inbox = await getInbox(inbox_id);
      const thread = await inbox.getThread(thread_id);
    
      const emailLines = thread.emails.map(
        (e, i) =>
          `${i + 1}. [${e.id}] From: ${e.from} | Subject: ${e.subject} | ${e.createdAt}` +
          (e.preview ? `\n   Preview: ${e.preview.slice(0, 100)}...` : '') +
          (e.isInjectionRisk ? '\n   ⚠️ INJECTION RISK' : ''),
      );
    
      return {
        content: [
          {
            type: 'text' as const,
            text: [
              `Thread: ${thread.subject}`,
              `Thread ID: ${thread.id}`,
              `Emails: ${thread.emailCount}`,
  • src/index.ts:322-330 (registration)
    Registration of the 'get_thread' tool with its schema and description.
    server.registerTool('get_thread', {
      title: 'Get Thread',
      description:
        'Get a conversation thread with all its emails in chronological order. ' +
        'Shows the full conversation flow including sender, subject, and preview for each email.',
      inputSchema: {
        inbox_id: z.string().describe('Inbox ID (e.g. ibx_...)'),
        thread_id: z.string().describe('Thread ID (e.g. thd_...)'),
      },

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