unsubscribe-from-thread
Stop receiving notifications for a specific conversation thread in a Liveblocks room. This tool removes your user from thread subscriptions.
Instructions
Unsubscribe from a Liveblocks thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | Yes | ||
| threadId | Yes | ||
| data | Yes |
Implementation Reference
- src/server.ts:425-432 (handler)Handler function that executes the tool logic by calling the Liveblocks SDK's unsubscribeFromThread method via the callLiveblocksApi wrapper.async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().unsubscribeFromThread( { roomId, threadId, data }, { signal: extra.signal } ) ); }
- src/server.ts:418-424 (schema)Zod input schema defining parameters: roomId, threadId, and data with userId.{ roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), },
- src/server.ts:415-433 (registration)MCP server.tool registration for the unsubscribe-from-thread tool, including name, description, schema, and 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 } ) ); } );