Skip to main content
Glama

affine_read_all_notifications

Clear all notification alerts in AFFiNE workspaces using the MCP server’s GraphQL API, ensuring an organized and focused user experience for managing documents and tasks.

Instructions

Mark all notifications as read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function `readAllNotificationsHandler` that sends a GraphQL mutation to mark all notifications as read and returns success or error via the `text` helper.
    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 }); } };
  • Registration of the tool 'affine_read_all_notifications' using `server.registerTool`, including title, description, empty input schema, and reference to the handler.
    server.registerTool( "affine_read_all_notifications", { title: "Mark All Notifications Read", description: "Mark all notifications as read.", inputSchema: {} }, readAllNotificationsHandler as any );
  • Tool metadata and input schema definition (empty, no parameters required). Note: output uses the shared `text` helper from util/mcp.js.
    { title: "Mark All Notifications Read", description: "Mark all notifications as read.", inputSchema: {} },

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/DAWNCR0W/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server