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
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | Yes | ||
| newRoomId | Yes |
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 } ) ); } );
- src/server.ts:152-159 (handler)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 } ) ); }
- src/server.ts:148-151 (schema)Input schema defining parameters: roomId (current room ID) and newRoomId (new room ID).{ roomId: z.string(), newRoomId: z.string(), },