subscribe-to-thread
Enable real-time updates for specific Liveblocks threads by subscribing with room and thread IDs. Stay informed on thread activity for collaborative workflows.
Instructions
Subscribe to a Liveblocks thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:405-412 (handler)The handler function for the 'subscribe-to-thread' MCP tool. It calls the Liveblocks client's subscribeToThread method, passing roomId, threadId, and data containing userId, wrapped in callLiveblocksApi for error handling and signal support.async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().subscribeToThread( { roomId, threadId, data }, { signal: extra.signal } ) ); }
- src/server.ts:398-404 (schema)Input schema (Zod) for the 'subscribe-to-thread' tool, defining parameters: roomId, threadId, and data with userId.{ roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), },
- src/server.ts:395-413 (registration)Registration of the 'subscribe-to-thread' tool on the McpServer instance, including name, description, input schema, and handler function.server.tool( "subscribe-to-thread", "Subscribe to a Liveblocks thread", { roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), }, async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().subscribeToThread( { roomId, threadId, data }, { signal: extra.signal } ) ); } );