delete_inbox
Remove a disposable email inbox and permanently delete all its emails to free up resources and stop receiving messages.
Instructions
Delete an inbox and all its emails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes | The inbox ID to delete |
Implementation Reference
- mcp-server/src/index.ts:178-190 (handler)The 'delete_inbox' tool handler - registers the tool with the MCP server, accepts inbox_id parameter, makes a DELETE request to the Blip API, and returns a confirmation message.
server.tool( "delete_inbox", "Delete an inbox and all its emails.", { inbox_id: z.string().describe("The inbox ID to delete"), }, async ({ inbox_id }) => { await blipFetch(`/v1/inboxes/${inbox_id}`, { method: "DELETE" }); return { content: [{ type: "text", text: `Inbox ${inbox_id} deleted.` }], }; } ); - mcp-server/src/index.ts:181-183 (schema)Input schema for the delete_inbox tool - requires a single string parameter 'inbox_id' with a description.
{ inbox_id: z.string().describe("The inbox ID to delete"), }, - mcp-server/src/index.ts:178-190 (registration)Registration of 'delete_inbox' as an MCP tool on the server via server.tool() call.
server.tool( "delete_inbox", "Delete an inbox and all its emails.", { inbox_id: z.string().describe("The inbox ID to delete"), }, async ({ inbox_id }) => { await blipFetch(`/v1/inboxes/${inbox_id}`, { method: "DELETE" }); return { content: [{ type: "text", text: `Inbox ${inbox_id} deleted.` }], }; } ); - mcp-server/src/index.ts:24-45 (helper)The blipFetch helper function used by the delete_inbox handler to make the HTTP DELETE request to the Blip API.
async function blipFetch( path: string, options: RequestInit = {} ): Promise<unknown> { const url = `${API_URL}${path}`; const res = await fetch(url, { ...options, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", ...options.headers, }, }); if (!res.ok) { const body = await res.text(); throw new Error(`Blip API error ${res.status} on ${options.method || "GET"} ${path}: ${body}`); } if (res.status === 204) return null; return res.json(); }