Skip to main content
Glama
liveblocks
by liveblocks

delete-inbox-notification

Remove specific inbox notifications from the Liveblocks server by specifying the user ID and notification ID to manage notification clutter effectively.

Instructions

Delete a Liveblocks inbox notification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inboxNotificationIdYes
userIdYes

Implementation Reference

  • The handler function that executes the delete-inbox-notification tool by calling the Liveblocks client's deleteInboxNotification method wrapped in callLiveblocksApi.
    async ({ userId, inboxNotificationId }, extra) => { return await callLiveblocksApi( getLiveblocks().deleteInboxNotification( { userId, inboxNotificationId }, { signal: extra.signal } ) ); }
  • Zod input schema for the tool parameters: userId and inboxNotificationId.
    { userId: z.string(), inboxNotificationId: z.string(), },
  • src/server.ts:725-740 (registration)
    Registration of the delete-inbox-notification tool on the MCP server, including description, schema, and inline handler.
    server.tool( "delete-inbox-notification", "Delete a Liveblocks inbox notification", { userId: z.string(), inboxNotificationId: z.string(), }, async ({ userId, inboxNotificationId }, extra) => { return await callLiveblocksApi( getLiveblocks().deleteInboxNotification( { userId, inboxNotificationId }, { signal: extra.signal } ) ); } );
  • Utility function used by the handler to execute Liveblocks API calls and format the response as MCP CallToolResult, handling success, no data, and errors.
    export async function callLiveblocksApi( liveblocksPromise: Promise<any> ): Promise<CallToolResult> { try { const data = await liveblocksPromise; if (!data) { return { content: [{ type: "text", text: "Success. No data returned." }], }; } return { content: [ { type: "text", text: "Here is the data. If the user has no specific questions, return it in a JSON code block", }, { type: "text", text: JSON.stringify(data, null, 2), }, ], }; } catch (err) { return { content: [ { type: "text", text: "" + err, }, ], }; } }
  • Helper function that initializes and returns the Liveblocks client instance used in the handler.
    function getLiveblocks() { if (!client) { client = new Liveblocks({ secret: process.env.LIVEBLOCKS_SECRET_KEY as string, }); } return client; }

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/liveblocks/liveblocks-mcp-server'

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