Skip to main content
Glama

Mark All Notifications Read

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: {}
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Mark all notifications as read' implies a mutation operation, it lacks details on permissions required, whether the action is reversible, side effects (e.g., if it affects unread counts system-wide), or response behavior. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Mark all notifications as read.' It is front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with 0 parameters, no output schema, and no annotations), the description is minimally adequate but incomplete. It states the action but omits crucial behavioral context like permissions, reversibility, or effects. With no annotations or output schema, the description should do more to compensate, resulting in a score of 3 as the bare minimum.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% description coverage, so no parameter documentation is needed. The description does not add parameter semantics, but this is appropriate given the lack of parameters. A baseline score of 4 is assigned as the description does not need to compensate for any schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Mark all notifications as read') with a specific verb and resource, making the purpose immediately understandable. However, it does not explicitly differentiate from its sibling 'affine_read_notification' (which likely marks a single notification as read), leaving room for slight ambiguity in sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'affine_read_notification' for individual notifications or 'affine_list_notifications' for viewing them. There are no prerequisites, exclusions, or contextual cues mentioned, leaving usage entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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