Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

update-room-id

Change a Liveblocks room's identifier to manage collaborative spaces by providing the current and new room IDs.

Instructions

Update a Liveblocks room's ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
newRoomIdYes

Implementation Reference

  • src/server.ts:145-160 (registration)
    Registers the 'update-room-id' tool, including schema and inline handler function that wraps the Liveblocks client's updateRoomId method.
    server.tool(
      "update-room-id",
      "Update a Liveblocks room's ID",
      {
        roomId: z.string(),
        newRoomId: z.string(),
      },
      async ({ roomId, newRoomId }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().updateRoomId(
            { currentRoomId: roomId, newRoomId },
            { signal: extra.signal }
          )
        );
      }
    );
  • The handler function executes the tool logic by calling the Liveblocks updateRoomId API through callLiveblocksApi and getLiveblocks().
    async ({ roomId, newRoomId }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().updateRoomId(
          { currentRoomId: roomId, newRoomId },
          { signal: extra.signal }
        )
      );
    }
  • Input schema defining parameters: roomId (current room ID) and newRoomId (new room ID).
    {
      roomId: z.string(),
      newRoomId: z.string(),
    },

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