subscribe-to-thread
Subscribe to a Liveblocks thread to receive real-time updates and notifications about conversations in collaborative rooms.
Instructions
Subscribe to a Liveblocks thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | Yes | ||
| threadId | Yes | ||
| data | Yes |
Implementation Reference
- src/server.ts:405-412 (handler)Handler function that invokes the Liveblocks subscribeToThread method, wrapped in callLiveblocksApi for MCP response formatting.async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().subscribeToThread( { roomId, threadId, data }, { signal: extra.signal } ) ); }
- src/server.ts:398-404 (schema)Input schema for the subscribe-to-thread tool using Zod, requiring roomId, threadId, and userId in data.{ 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 using McpServer.tool method, including description, input schema, and handler.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 } ) ); } );