update-room-subscription-settings
Modify notification preferences for threads and mentions in a Liveblocks collaborative room to control user alerts.
Instructions
Update a Liveblocks room's subscription settings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | Yes | ||
| userId | Yes | ||
| data | Yes |
Implementation Reference
- src/server.ts:596-621 (registration)Registration of the 'update-room-subscription-settings' tool, including inline input schema (Zod) and handler function that invokes the Liveblocks SDK's updateRoomSubscriptionSettings method wrapped in callLiveblocksApi.server.tool( "update-room-subscription-settings", `Update a Liveblocks room's subscription settings`, { roomId: z.string(), userId: z.string(), data: z.object({ threads: z .union([ z.literal("all"), z.literal("replies_and_mentions"), z.literal("none"), ]) .optional(), textMentions: z.union([z.literal("mine"), z.literal("none")]).optional(), }), }, async ({ roomId, userId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().updateRoomSubscriptionSettings( { roomId, userId, data }, { signal: extra.signal } ) ); } );
- src/server.ts:613-620 (handler)The core handler logic for executing the tool, which calls the Liveblocks API to update the subscription settings for a user in a room.async ({ roomId, userId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().updateRoomSubscriptionSettings( { roomId, userId, data }, { signal: extra.signal } ) ); }
- src/server.ts:599-612 (schema)Zod input schema defining parameters: roomId, userId, and data object with optional threads and textMentions settings.{ roomId: z.string(), userId: z.string(), data: z.object({ threads: z .union([ z.literal("all"), z.literal("replies_and_mentions"), z.literal("none"), ]) .optional(), textMentions: z.union([z.literal("mine"), z.literal("none")]).optional(), }), },