Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

mark-notifications-read

Mark GitHub notifications as read to clean up your notification center. Specify a timestamp to mark notifications from a specific time period.

Instructions

Mark GitHub notifications as read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
last_read_atNoISO 8601 timestamp - marks notifications updated at or before this time as read. Default is current time.
readNoWhether to mark notifications as read or unread

Implementation Reference

  • The main handler function that implements the tool logic: prepares request body with parameters, calls GitHub API via githubPut to mark notifications as read/unread, handles response or error with formatted messages.
    export async function markNotificationsReadHandler(args: z.infer<typeof markNotificationsReadSchema>) {
      try {
        // Prepare request body
        const requestBody = {
          last_read_at: args.last_read_at,
          read: args.read
        };
    
        // Make request to GitHub API
        const response = await githubPut<MarkNotificationsReadResponse>("/notifications", requestBody);
    
        // Check if notifications are processed asynchronously
        if (response.message) {
          return {
            content: [{
              type: "text",
              text: `${response.message}`
            }]
          };
        }
    
        // Default success message
        return {
          content: [{
            type: "text",
            text: `Successfully marked notifications as ${args.read ? 'read' : 'unread'}.${
              args.last_read_at 
                ? ` Notifications updated on or before ${new Date(args.last_read_at).toLocaleString()} were affected.` 
                : ''
            }`
          }]
        };
      } catch (error) {
        return {
          isError: true,
          content: [{
            type: "text",
            text: formatError("Failed to mark notifications as read", error)
          }]
        };
      }
    }
  • Zod schema defining input parameters for the tool: optional last_read_at timestamp and optional read boolean (default true).
    export const markNotificationsReadSchema = z.object({
      last_read_at: z.string().optional().describe(
        "ISO 8601 timestamp - marks notifications updated at or before this time as read. Default is current time."
      ),
      read: z.boolean().optional().default(true).describe(
        "Whether to mark notifications as read or unread"
      )
    });
  • Function that registers the tool with the MCP server, specifying name, description, input schema, and handler.
    export function registerMarkNotificationsReadTool(server: any) {
      server.tool(
        "mark-notifications-read",
        "Mark GitHub notifications as read",
        markNotificationsReadSchema.shape,
        markNotificationsReadHandler
      );
    }
  • src/server.ts:39-39 (registration)
    Call to register the mark-notifications-read tool during server initialization.
    registerMarkNotificationsReadTool(server);
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 as read' implies a mutation operation, the description doesn't specify required permissions, whether the operation is reversible (the 'read' parameter suggests it might be), rate limits, or what happens when marking fails. For a mutation tool with zero annotation coverage, this is insufficient.

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 wasted words. It's appropriately sized for a tool with two well-documented parameters and gets straight to the point without unnecessary elaboration.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after marking (success/failure response, side effects), doesn't clarify scope relative to sibling tools, and provides minimal behavioral context. For a tool that modifies notification state, more guidance is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters (last_read_at with ISO 8601 format and default, read with boolean type and default). The description adds no parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

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') and resource ('GitHub notifications as read'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'mark-repo-notifications-read' or 'mark-thread-read', which appear to perform similar marking operations on different notification scopes.

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. With sibling tools like 'mark-repo-notifications-read' and 'mark-thread-read' available, there's no indication whether this tool marks all notifications globally, by user, or by some other scope. No prerequisites, exclusions, or alternative recommendations are mentioned.

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/mcollina/mcp-github-notifications'

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