Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

update-notification-settings

Modify notification preferences for Liveblocks users by adjusting settings for specific notification types.

Instructions

Update Liveblocks notification settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYes
dataYes

Implementation Reference

  • src/server.ts:774-801 (registration)
    Registration of the 'update-notification-settings' tool using McpServer.tool(), including name, description, input schema, and handler function.
    server.tool(
      "update-notification-settings",
      "Update Liveblocks notification settings",
      {
        userId: z.string(),
        data: z.record(
          z.string(),
          z.record(
            z.union([
              z.literal("thread"),
              z.literal("textMention"),
              z.string().regex(/^\$/, {
                message: "String must start with '$'",
              }),
            ]),
            z.boolean()
          )
        ),
      },
      async ({ userId }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().getNotificationSettings(
            { userId },
            { signal: extra.signal }
          )
        );
      }
    );
  • Zod input schema defining parameters: userId (string) and data (record of notification types to boolean enabled/disabled).
    {
      userId: z.string(),
      data: z.record(
        z.string(),
        z.record(
          z.union([
            z.literal("thread"),
            z.literal("textMention"),
            z.string().regex(/^\$/, {
              message: "String must start with '$'",
            }),
          ]),
          z.boolean()
        )
      ),
    },
  • Handler function for executing the tool. Wraps Liveblocks getNotificationSettings API call (note: mismatches tool name, likely intended to be updateNotificationSettings and use 'data' param).
    async ({ userId }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().getNotificationSettings(
          { userId },
          { signal: extra.signal }
        )
      );
    }

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