Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

unsubscribe-from-thread

Stop receiving notifications for a specific conversation thread in a Liveblocks room. This tool removes your user from thread subscriptions.

Instructions

Unsubscribe from a Liveblocks thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
threadIdYes
dataYes

Implementation Reference

  • Handler function that executes the tool logic by calling the Liveblocks SDK's unsubscribeFromThread method via the callLiveblocksApi wrapper.
    async ({ roomId, threadId, data }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().unsubscribeFromThread(
          { roomId, threadId, data },
          { signal: extra.signal }
        )
      );
    }
  • Zod input schema defining parameters: roomId, threadId, and data with userId.
    {
      roomId: z.string(),
      threadId: z.string(),
      data: z.object({
        userId: z.string(),
      }),
    },
  • src/server.ts:415-433 (registration)
    MCP server.tool registration for the unsubscribe-from-thread tool, including name, description, schema, and handler.
    server.tool(
      "unsubscribe-from-thread",
      "Unsubscribe from a Liveblocks thread",
      {
        roomId: z.string(),
        threadId: z.string(),
        data: z.object({
          userId: z.string(),
        }),
      },
      async ({ roomId, threadId, data }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().unsubscribeFromThread(
            { 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