Skip to main content
Glama
liveblocks
by liveblocks

get-active-users

Retrieve real-time active user data from Liveblocks collaboration rooms to monitor engagement and manage room capacity.

Instructions

Get a Liveblocks room's active users

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes

Implementation Reference

  • src/server.ts:162-173 (registration)
    Registration of the 'get-active-users' MCP tool, including input schema (roomId: string) and inline handler function that calls the Liveblocks API via getLiveblocks().getActiveUsers and formats response with callLiveblocksApi.
    server.tool( "get-active-users", "Get a Liveblocks room's active users", { roomId: z.string(), }, async ({ roomId }, extra) => { return await callLiveblocksApi( getLiveblocks().getActiveUsers(roomId, { signal: extra.signal }) ); } );
  • The handler function executing the tool logic: fetches active users for the given roomId using Liveblocks client, wrapped in callLiveblocksApi for MCP response formatting.
    async ({ roomId }, extra) => { return await callLiveblocksApi( getLiveblocks().getActiveUsers(roomId, { signal: extra.signal }) ); }
  • Input schema for the tool: requires a roomId string.
    { roomId: 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