Skip to main content
Glama
liveblocks
by liveblocks

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
NameRequiredDescriptionDefault
roomIdYes
threadIdYes

Implementation Reference

  • 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 }) ); }
  • 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 }) ); } );
  • 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; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/liveblocks/liveblocks-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server