create_inbox
Generate a new email inbox with a LobsterMail.ai address for AI agents. Provide a name or organization to create a meaningful address, or get a random one automatically.
Instructions
Create a new email inbox. Returns an @lobstermail.ai address. Provide your name/org for a meaningful address (e.g. sarah-shield@lobstermail.ai), or omit for a random lobster-xxxx address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Your name or agent name (e.g. "Sarah Shield") | |
| org | No | Organization name (e.g. "Palisade") | |
| preferred | No | Explicit local parts to try first (e.g. ["billing-bot", "billing"]) | |
| displayName | No | Display name for the inbox |
Implementation Reference
- src/index.ts:18-60 (handler)The `create_inbox` tool registration and handler logic. It uses the `lm` client to either create a smart inbox or a standard inbox, then caches it and returns the details.
server.registerTool('create_inbox', { title: 'Create Email Inbox', description: 'Create a new email inbox. Returns an @lobstermail.ai address. ' + 'Provide your name/org for a meaningful address (e.g. sarah-shield@lobstermail.ai), ' + 'or omit for a random lobster-xxxx address.', inputSchema: { name: z.string().optional().describe('Your name or agent name (e.g. "Sarah Shield")'), org: z.string().optional().describe('Organization name (e.g. "Palisade")'), preferred: z .array(z.string()) .optional() .describe('Explicit local parts to try first (e.g. ["billing-bot", "billing"])'), displayName: z.string().optional().describe('Display name for the inbox'), }, }, async ({ name, org, preferred, displayName }) => { const lm = await getClient(); const hasSmartOpts = name || org || preferred; const inbox = hasSmartOpts ? await lm.createSmartInbox({ name, org, preferred, displayName }) : await lm.createInbox({ displayName }); cacheInbox(inbox); return { content: [ { type: 'text' as const, text: [ `Inbox created successfully.`, ``, `Address: ${inbox.address}`, `Inbox ID: ${inbox.id}`, `Active: ${inbox.isActive}`, inbox.expiresAt ? `Expires: ${inbox.expiresAt}` : null, ``, `Use this inbox_id with check_inbox, wait_for_email, and other tools.`, ] .filter(Boolean) .join('\n'), }, ], }; });