Live User Count
rybbit_live_usersMonitor real-time active user counts on websites to track engagement and performance metrics.
Instructions
Get the current number of live/active users on a site in real-time
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | Site ID (numeric ID or domain identifier) |
Implementation Reference
- src/tools/overview.ts:41-61 (handler)The handler function that executes the "rybbit_live_users" tool by calling the Rybbit client API.
async (args) => { try { const count = await client.get<number>( `/sites/${args.siteId}/live-user-count` ); return { content: [ { type: "text" as const, text: truncateResponse({ liveUsers: count }), }, ], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } - src/tools/overview.ts:25-40 (registration)The MCP registration of the "rybbit_live_users" tool.
server.registerTool( "rybbit_live_users", { title: "Live User Count", description: "Get the current number of live/active users on a site in real-time", inputSchema: { siteId: siteIdSchema, }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, },