get_notifications
Retrieve a list of notifications from Backlog by specifying ID range, count, sorting, and read status to manage project updates efficiently.
Instructions
Returns list of notifications
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alreadyRead | No | Whether to include already read notifications | |
| count | No | Number of notifications to retrieve | |
| maxId | No | Maximum notification ID | |
| minId | No | Minimum notification ID | |
| order | No | Sort order | |
| resourceAlreadyRead | No | Whether to include notifications for already read resources |
Implementation Reference
- src/tools/getNotifications.ts:28-51 (handler)Complete tool definition for 'get_notifications', including the handler function that invokes backlog.getNotifications with input parameters.export const getNotificationsTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getNotificationsSchema>, (typeof NotificationSchema)['shape'] > => { return { name: 'get_notifications', description: t( 'TOOL_GET_NOTIFICATIONS_DESCRIPTION', 'Returns list of notifications' ), schema: z.object(getNotificationsSchema(t)), outputSchema: NotificationSchema, handler: async ({ minId, maxId, count, order }) => backlog.getNotifications({ minId, maxId, count, order, }), }; };
- src/tools/getNotifications.ts:7-26 (schema)Input schema for the get_notifications tool, defining optional parameters minId, maxId, count, and order using Zod.const getNotificationsSchema = buildToolSchema((t) => ({ minId: z .number() .optional() .describe(t('TOOL_GET_NOTIFICATIONS_MIN_ID', 'Minimum notification ID')), maxId: z .number() .optional() .describe(t('TOOL_GET_NOTIFICATIONS_MAX_ID', 'Maximum notification ID')), count: z .number() .optional() .describe( t('TOOL_GET_NOTIFICATIONS_COUNT', 'Number of notifications to retrieve') ), order: z .enum(['asc', 'desc']) .optional() .describe(t('TOOL_GET_NOTIFICATIONS_ORDER', 'Sort order')), }));
- src/tools/tools.ts:147-157 (registration)Registration of the get_notifications tool (via getNotificationsTool) into the 'notifications' toolset group in the allTools export.{ name: 'notifications', description: 'Tools for managing user notifications.', enabled: false, tools: [ getNotificationsTool(backlog, helper), getNotificationsCountTool(backlog, helper), resetUnreadNotificationCountTool(backlog, helper), markNotificationAsReadTool(backlog, helper), ], },