get-inbox-notifications
Fetch recent inbox notifications from Liveblocks, including unread messages, for a specified user ID with customizable query parameters.
Instructions
Get recent Liveblocks inbox notifications
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | ||
| startingAfter | No | ||
| userId | Yes |
Implementation Reference
- src/server.ts:658-679 (registration)Registration of the 'get-inbox-notifications' MCP tool, including inline Zod input schema (userId required, optional query.unread, startingAfter, limit) and handler function that calls the Liveblocks getInboxNotifications API wrapped by callLiveblocksApi utility.server.tool( "get-inbox-notifications", `Get recent Liveblocks inbox notifications`, { userId: z.string(), query: z .object({ unread: z.boolean(), }) .optional(), startingAfter: z.string().optional(), limit: z.number().optional(), }, async ({ userId, query, startingAfter, limit }, extra) => { return await callLiveblocksApi( getLiveblocks().getInboxNotifications( { userId, query, startingAfter, limit }, { signal: extra.signal } ) ); } );
- src/server.ts:671-678 (handler)The handler function implementing the tool logic: proxies parameters to Liveblocks' getInboxNotifications method via getLiveblocks() client and callLiveblocksApi utility, respecting the request signal.async ({ userId, query, startingAfter, limit }, extra) => { return await callLiveblocksApi( getLiveblocks().getInboxNotifications( { userId, query, startingAfter, limit }, { signal: extra.signal } ) ); }
- src/server.ts:661-670 (schema)Zod schema for tool inputs: requires userId (string), optional query object with unread (boolean), startingAfter (string), and limit (number).{ userId: z.string(), query: z .object({ unread: z.boolean(), }) .optional(), startingAfter: z.string().optional(), limit: z.number().optional(), },