Skip to main content
Glama
liveblocks
by liveblocks

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

Implementation Reference

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

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