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
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | ||
| data | Yes |
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 } ) ); } );
- src/server.ts:777-792 (schema)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() ) ), },
- src/server.ts:793-800 (handler)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 } ) ); }