Skip to main content
Glama
liveblocks
by liveblocks

get-rooms

Retrieve recent Liveblocks rooms based on specific criteria such as limit, user ID, group IDs, room ID, or metadata. Streamline room management and data access.

Instructions

Get recent Liveblocks rooms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdsNo
limitYes
queryNo
startingAfterNo
userIdNo

Implementation Reference

  • src/server.ts:32-59 (registration)
    Registration of the 'get-rooms' MCP tool, including input schema definition and inline handler function that proxies to Liveblocks.getRooms API via callLiveblocksApi.
    server.tool( "get-rooms", `Get recent Liveblocks rooms`, { limit: z.number().lte(100), userId: z.string().optional(), groupIds: z.array(z.string()).optional(), startingAfter: z.string().optional(), query: z .object({ roomId: z .object({ startsWith: z.string(), }) .optional(), metadata: z.record(z.string(), z.string()).optional(), }) .optional(), }, async ({ limit, userId, groupIds, startingAfter, query }, extra) => { return await callLiveblocksApi( getLiveblocks().getRooms( { limit, userId, groupIds, startingAfter, query }, { signal: extra.signal } ) ); } );
  • Input schema for the 'get-rooms' tool using Zod validation.
    { limit: z.number().lte(100), userId: z.string().optional(), groupIds: z.array(z.string()).optional(), startingAfter: z.string().optional(), query: z .object({ roomId: z .object({ startsWith: z.string(), }) .optional(), metadata: z.record(z.string(), z.string()).optional(), }) .optional(), },
  • Handler function for 'get-rooms' tool: calls Liveblocks.getRooms with provided parameters and wraps in callLiveblocksApi.
    async ({ limit, userId, groupIds, startingAfter, query }, extra) => { return await callLiveblocksApi( getLiveblocks().getRooms( { limit, userId, groupIds, startingAfter, query }, { 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