Skip to main content
Glama

Mark All Notifications Read

read_all_notifications

Mark all unread notifications as read to clear notification badges in AFFiNE workspaces.

Instructions

Mark all notifications as read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 });
      }
    };
  • 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
    );
  • 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: {}
  • Tool name listed in the ALL_TOOLS constant array and its tool group permissions (notifications, notifications.write, write).
    "read_all_notifications",
  • Tool group mapping for 'read_all_notifications' defining permission scopes.
    read_all_notifications: ["notifications", "notifications.write", "write"],
Behavior2/5

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

No annotations are provided, and the description only states the basic mutation action. It does not disclose behavioral traits such as idempotency, side effects (e.g., affecting other users), rate limits, or whether any confirmation is needed. The tool could be destructive but the description gives no warning.

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 sentence with no wasted words. It is front-loaded and directly conveys the tool's purpose.

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

Completeness2/5

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

Given no output schema, the description should explain the result of the operation (e.g., returns count or success status). It does not. For a mutation tool with no annotations, this is insufficient for an agent to fully understand the behavior.

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 zero parameters, so the description is not required to explain parameters. Nevertheless, the description adds meaning by specifying the action (mark as read) which is not evident from the empty schema. Baseline for zero-param tools is 4.

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 'Mark all notifications as read' clearly states the action (marking as read) and the resource (notifications). It resolves the ambiguity of the name 'read_all_notifications' which could imply viewing. However, it does not distinguish from sibling 'list_notifications' which is a read-only operation.

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?

No guidance is provided on when to use this tool versus alternatives like 'list_notifications'. The description does not mention context, prerequisites, or exclusions.

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

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