Skip to main content
Glama
liveblocks
by liveblocks

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

Implementation Reference

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

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