Skip to main content
Glama

affine_read_notification

Mark a notification as read in AFFiNE workspaces by specifying its ID using the GraphQL API. Simplifies notification management for streamlined workspace operations.

Instructions

Mark a notification as read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNotification ID

Implementation Reference

  • The handler function that executes the tool logic: marks a notification as read by sending a GraphQL mutation to the server.
    const readNotificationHandler = async ({ id }: { id: string }) => { try { const mutation = ` mutation ReadNotification($id: String!) { readNotification(id: $id) } `; const data = await gql.request<{ readNotification: boolean }>(mutation, { id }); return text({ success: data.readNotification, notificationId: id }); } catch (error: any) { return text({ error: error.message }); } };
  • Tool registration call for 'affine_read_notification', including title, description, and input schema.
    server.registerTool( "affine_read_notification", { title: "Mark Notification Read", description: "Mark a notification as read.", inputSchema: { id: z.string().describe("Notification ID") } }, readNotificationHandler as any );
  • Input schema definition for the tool, specifying the 'id' parameter as a string.
    inputSchema: { id: z.string().describe("Notification ID") } },

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