Mark All Notifications Read
read_all_notificationsMark all unread notifications as read to clear notification badges in AFFiNE workspaces.
Instructions
Mark all notifications as read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/notifications.ts:70-84 (handler)The handler function that executes the 'read_all_notifications' tool logic. It sends a GraphQL mutation `readAllNotifications` and returns success status.
const readAllNotificationsHandler = async () => { try { const mutation = ` mutation ReadAllNotifications { readAllNotifications } `; const data = await gql.request<{ readAllNotifications: boolean }>(mutation); return text({ success: data.readAllNotifications, message: "All notifications marked as read" }); } catch (error: any) { return text({ error: error.message }); } }; - src/tools/notifications.ts:85-93 (registration)The registration of the 'read_all_notifications' tool on the MCP server, including its title 'Mark All Notifications Read', description, empty inputSchema, and handler binding.
server.registerTool( "read_all_notifications", { title: "Mark All Notifications Read", description: "Mark all notifications as read.", inputSchema: {} }, readAllNotificationsHandler as any ); - src/tools/notifications.ts:88-90 (schema)The input schema for 'read_all_notifications' - an empty object since the tool takes no parameters.
title: "Mark All Notifications Read", description: "Mark all notifications as read.", inputSchema: {} - src/toolSurface.ts:61-61 (registration)Tool name listed in the ALL_TOOLS constant array and its tool group permissions (notifications, notifications.write, write).
"read_all_notifications", - src/toolSurface.ts:151-151 (registration)Tool group mapping for 'read_all_notifications' defining permission scopes.
read_all_notifications: ["notifications", "notifications.write", "write"],