unsubscribe-from-thread
Remove a user from notifications or updates for a specific thread in Liveblocks by providing the room ID, thread ID, and user ID.
Instructions
Unsubscribe from a Liveblocks thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:425-432 (handler)The main handler function that executes the unsubscribe-from-thread tool logic by calling the Liveblocks API via getLiveblocks().unsubscribeFromThread wrapped in callLiveblocksApi.async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().unsubscribeFromThread( { roomId, threadId, data }, { signal: extra.signal } ) ); }
- src/server.ts:418-424 (schema)Zod schema defining the input parameters for the unsubscribe-from-thread tool: roomId, threadId, and data containing userId.{ roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), },
- src/server.ts:415-433 (registration)MCP server tool registration for 'unsubscribe-from-thread', including name, description, schema, and inline handler.server.tool( "unsubscribe-from-thread", "Unsubscribe from a Liveblocks thread", { roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), }, async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().unsubscribeFromThread( { roomId, threadId, data }, { signal: extra.signal } ) ); } );