get-thread
Retrieve a specific thread from a Liveblocks room using the room ID and thread ID. Simplify collaborative workflows by accessing threaded conversations directly.
Instructions
Get a Liveblocks thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:289-293 (handler)The handler function that implements the core logic of the 'get-thread' tool by invoking the Liveblocks API to retrieve a specific thread.async ({ roomId, threadId }, extra) => { return await callLiveblocksApi( getLiveblocks().getThread({ roomId, threadId }, { signal: extra.signal }) ); }
- src/server.ts:285-288 (schema)Zod input schema defining required parameters: roomId (string) and threadId (string).{ roomId: z.string(), threadId: z.string(), },
- src/server.ts:282-294 (registration)Registers the 'get-thread' tool with the MCP server, including name, description, schema, and handler.server.tool( "get-thread", "Get a Liveblocks thread", { roomId: z.string(), threadId: z.string(), }, async ({ roomId, threadId }, extra) => { return await callLiveblocksApi( getLiveblocks().getThread({ roomId, threadId }, { signal: extra.signal }) ); } );
- src/server.ts:21-28 (helper)Helper function that lazily initializes and returns the Liveblocks client instance used in the tool handler.function getLiveblocks() { if (!client) { client = new Liveblocks({ secret: process.env.LIVEBLOCKS_SECRET_KEY as string, }); } return client; }